Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Marc-André Lafortune's latest activity

Tuesday, May 04 2010
4457 find_or_create_by_foo when foo is protected attribute was updated in Ruby on Rails
  • Marc-André Lafortune
    Marc-André Lafortune commented at 7:06 PM

    I'm fine with the arugment protection, as long as the other form find_or_create_by_name("Marc-André", :whatever => "value") is fixed.

Monday, April 26 2010
4457 find_or_create_by_foo when foo is protected attribute was updated in Ruby on Rails
  • Marc-André Lafortune
    Marc-André Lafortune commented at 6:22 PM

    Actually, is it only me, or the example from the doc will not work (protected fields or not)?

    User.find_or_create_by_name('Bob', :age => 40) # this won't set th...

  • Marc-André Lafortune
    Marc-André Lafortune commented at 6:14 PM

    I am not sure what you mean by "should be using the association builders", so maybe I am missing something.

    To be a bit more convincing that this is a bug, let ...

Thursday, April 22 2010
4457 find_or_create_by_foo when foo is protected attribute was created in Ruby on Rails
  • Marc-André Lafortune
    Marc-André Lafortune created the ticket at 5:19 PM

    I understand that for security reasons it is a good idea that methods like find_or_create_by_foo(params) do not write on protected attributes.

    I question the ra...

Tuesday, April 14 2009
2489 Enumerable#sum should not rely on size was created in Ruby on Rails
  • Marc-André Lafortune
    Marc-André Lafortune created the ticket at 6:27 AM

    Enumerable#sum should be valid for any Enumerable, not just those that respond_to? :size (like Array but unlike Range, for example).

    My simple change maintains ...

Thursday, July 17 2008
648 mail_to :javascript screws up unicode was updated in Ruby on Rails
  • Marc-André Lafortune
    Marc-André Lafortune commented at 10:50 PM

    Oups, managed to screw up my very first ticket... The example should read:

    mail_to "xxx@example.com", "Écris-nous", :encode=>:javascript
    

    and the temporary f...

  • Marc-André Lafortune
    Marc-André Lafortune created the ticket at 10:45 PM

    If the 'name' parameter for mail_to contains unicode characters, these will not show properly in the link. Solution involves using to_json before outputing eac...