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.

Pratik's latest activity

Monday, March 09 2009
1274 Add support for :order => :random in queries was updated in Ruby on Rails
  • Pratik
    Pratik commented at 7:00 PM

    Here are some benchmarks with 100k rows ( forget millions ).

    
    [lifo@null]$ script/performance/benchmarker 1 'Item.all(:limit => 5, :order => "rand()")'
         ...
  • Pratik
    • Assigned user set to Pratik
    • State changed from new to wontfix
    • Title changed from [PATCH] add support for :order => :random in queries to Add support for :order => :random in queries
    by Pratik at 5:59 PM

    ORDER BY RAND() usually have a performance implication. Finding random records doesn't really have a single solution for all the possible scenarios. Also, for t...

2181 Default Scope with conditions on create was updated in Ruby on Rails
  • Pratik
    • Assigned user set to Pratik
    • State changed from new to incomplete
    by Pratik at 4:47 PM

    Missing tests.

  • Pratik
    • Assigned user set to Pratik
    by Pratik at 4:45 PM

    Does the following work ?

    
    default_scope :conditions=>{ :color => ["Red", "Blue"] }
    
2179 ActiveResource not eager loading namespaced models was updated in Ruby on Rails
  • Pratik
    • Assigned user set to Pratik
    • State changed from new to incomplete
    by Pratik at 3:47 PM

    Could you please upload a patch using git-format-patch ? http://guides.rails.info/contrib... should help.

    Also, your patch seems to be missing the tests.

    Thank...

1855 Return associated records not proxies from readers of non-collection associat... was updated in Ruby on Rails
  • Pratik
    • Tag changed from activerecord, association, associations, association_proxy to activerecord, association, associations, association_proxy, patch
    • Title changed from [PATCH] return associated records not proxies from readers of non-collection associations to Return associated records not proxies from readers of non-collection associations
    by Pratik at 3:00 PM
1655 ask not working in TemplateRunner through rake rails:template was updated in Ruby on Rails
  • Pratik
    • State changed from invalid to open
    by Pratik at 2:59 PM

    Oops. My bad.

1966 Destroy should respect optimistic locking was updated in Ruby on Rails
  • Pratik
    • Assigned user set to Pratik
    • Title changed from [patch] Destroy should respect optimistic locking to Destroy should respect optimistic locking
    by Pratik at 2:48 PM
2089 Add AR::Base#just_created? to differentiate records was updated in Ruby on Rails
  • Pratik
    • Assigned user set to Pratik
    • State changed from new to wontfix
    by Pratik at 2:42 PM

    just_created? should return false for new records. Also, let's wait till someone else wants the same feature, then I'll push it.

    Thanks.

1973 link_to :method may append FORM within FORM was updated in Ruby on Rails
  • Pratik
    • Assigned user set to josh
    • State changed from new to incomplete
    • Title changed from [patch] link_to :method may append FORM within FORM to link_to :method may append FORM within FORM
    by Pratik at 2:22 PM

    Patch should have tests too.