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.

There was a problem

You must be a member of this account.

Elliot Winkler's latest activity

Monday, August 10 2009
430 validates_non_format_of - the converse of validates_format_of was updated in Ruby on Rails
  • Elliot Winkler
    Elliot Winkler commented at 2:38 PM

    Are all validations in ActiveModel, is that how it works now?

Sunday, August 09 2009
3020 ActiveResource#exists? does not work at all was updated in Ruby on Rails
  • Elliot Winkler
    Elliot Winkler commented at 11:34 PM

    This is actually the exact same problem I posted way back in #1223, so I think that one can be closed.

Saturday, August 01 2009
2791 ActiveRecord::Base.find_in_batches puts a with_scope into the block that is e... was updated in Ruby on Rails
  • Elliot Winkler
    Elliot Winkler commented at 9:21 PM

    I don't understand why the exclusive scope is needed. Shouldn't you be able to do Shirt.red.find_each and find_each then do the right thing?

Tuesday, July 28 2009
2957 Adding Array.uniq_by(proc) to core_ext, allowing selection of unique elements... was updated in Ruby on Rails
  • Elliot Winkler
    Elliot Winkler commented at 7:29 PM

    +1 for the idea. I wrote a version of the method a while back (except using inject + a hash instead of a select within a select as you've got). It does come in ...

Tuesday, July 21 2009
2923 named_scope through a has_many (or has_many through) generates redundant cond... was updated in Ruby on Rails
  • Elliot Winkler
    • Tag changed from named_scope to named_scope, patch
    by Elliot Winkler at 3:24 AM
Monday, July 20 2009
fix_redundant_conditions.patch was uploaded by Elliot Winkler at 7:16 AM to #2923, Ruby on Rails
2923 named_scope through a has_many (or has_many through) generates redundant cond... was created in Ruby on Rails
  • Elliot Winkler
    Elliot Winkler created the ticket at 7:15 AM

    Setup:

    class Shop < ActiveRecord::Base
      has_many :dogs
    end
    class Dog < ActiveRecord::Base
      named_scope :attractive, :conditions => { "color" => %w(yellow bla...
Wednesday, July 01 2009
1004 datetime_select to accept :ampm option was updated in Ruby on Rails
  • Elliot Winkler
    Elliot Winkler commented at 10:49 PM

    The rails-twelve-hour-time plugin linked to above also works in 2.3. You could probably start with that.

Monday, June 29 2009
430 validates_non_format_of - the converse of validates_format_of was updated in Ruby on Rails
  • Elliot Winkler
    Elliot Winkler commented at 5:11 AM

    I think validates_format_of :permalink, :not => /admin/i reads a bit better. We ended up patching Rails a while back to support this, so I've prepped this into ...

Sunday, June 28 2009
2820 AR::Base.find_every should support :preload => false option was updated in Ruby on Rails
  • Elliot Winkler
    • Title changed from Feature Request - add association option for find_with_associations to AR::Base.find_every should support :preload => false option
    by Elliot Winkler at 9:47 AM

    I've been wanting this too, and so I made a patch for it (pass :preload => false to disable preloading for a specific query). A test is included, but I wasn't q...