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.

Hugo Peixoto's latest activity

Thursday, March 24 2011
6058 update_all ignores conditions, when :orders and :limit options are supplied was updated in Ruby on Rails
  • Hugo Peixoto
    Hugo Peixoto commented at 6:41 AM

    2.0.x backported patch attached.

Sunday, March 06 2011
6459 Arel update method silently drops OFFSET clause was updated in Ruby on Rails
  • Hugo Peixoto
    Hugo Peixoto commented at 11:01 AM

    The previous patch had a problem. The WHERE conditions should not be in the parent UPDATE statement, but in the subselect one. This is related to Bug #6058").

    T...

  • Hugo Peixoto
    • Tag set to arel
    by Hugo Peixoto at 1:54 AM

    In postgresql, that query gets converted to the something like the following:

    UPDATE things SET broken = 1 WHERE id IN (SELECT id FROM things ORDER BY freshnes...
6058 update_all ignores conditions, when :orders and :limit options are supplied was updated in Ruby on Rails
  • Hugo Peixoto
    Hugo Peixoto commented at 10:53 AM

    The previous patch kept the where conditions on the UPDATE statement. That is not the correct behavior, as the order/limit clauses wouldn't be applied with the ...

Saturday, March 05 2011
6058 update_all ignores conditions, when :orders and :limit options are supplied was updated in Ruby on Rails
  • Hugo Peixoto
    Hugo Peixoto commented at 11:12 PM

    Looks like the bug is in ARel indeed. When a subquery is generated, all other WHERE clauses are dropped.

    I attached a patch that fixes this bug and adds a test ...

Saturday, September 18 2010
4316 Naming a partial _when.html.erb throws a compile error was updated in Ruby on Rails
  • Hugo Peixoto
    Hugo Peixoto commented at 8:10 PM

    When you create a partial such as _house.html.erb, it automatically passes the variable @house to a local variable named house. So, would you create a partial n...

Monday, August 30 2010
5493 form_for silently failing with rails 3.0.0 was updated in Ruby on Rails
  • Hugo Peixoto
    Hugo Peixoto commented at 5:40 AM

    Found the potential source of the problem.

    It seems like a bad case of copy-pasta gone wrong in the haml gem; the form_for method is defined twice, and the latt...

  • Hugo Peixoto
    Hugo Peixoto commented at 5:28 AM

    Confirmed Wolax's described behaviour

Monday, August 10 2009
2049 to_xml nil => true attribute should not appear when I skip types was updated in Ruby on Rails
  • Hugo Peixoto
    Hugo Peixoto commented at 6:57 AM

    -1 for the requested behaviour for skip_types. I'm with both Dan and Josh on this one.

    I could add a skip_nil option to both activemodel and activesupport. Shou...

3012 test tasks fail when db/schema.rb doesn't exist was updated in Ruby on Rails