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.

Paweł Kondzior's latest activity

Sunday, December 14 2008
1570 named_scope not preserving proper model in STI was created in Ruby on Rails
  • Paweł Kondzior
    Paweł Kondzior created the ticket at 3:26 AM

    Simple example:

    
    class User < ActiveRecord::Base
      named_scope(:simple_test, lambda { puts self.inspect; {} })
    end
    
    class Employee < ActiveRecord::Base
    e...
Wednesday, December 03 2008
1505 Allow to unmoemoize only specific method(s) was updated in Ruby on Rails
  • Paweł Kondzior
    Paweł Kondzior commented at 9:13 PM

    I love it ;) Big thanks.

  • Paweł Kondzior
    Paweł Kondzior commented at 8:43 AM

    Internally in Memoizable::Freezable i think it will be DRY to not repeat same code in unmemoizel_all and unmemoize. Obviously i don't know what internal policy ...

  • Paweł Kondzior
    Paweł Kondzior commented at 8:39 AM

    In this example foo is memoized method ?

    Using unmemoize(:method1, :method2) can be useful when we want to override attribute setter which depends on our memoiz...

Tuesday, December 02 2008
1505 Allow to unmoemoize only specific method(s) was created in Ruby on Rails
  • Paweł Kondzior
    Paweł Kondzior created the ticket at 12:04 PM

    This patch will allow to unmemoize only specific methods, right now when you want to unmemoize something in instance of method, you must use unmemoize_all

1500 Named scopes should implement #many? so they'll use COUNT(*) was updated in Ruby on Rails
Friday, November 28 2008
1354 HABTM, :finder_sql and preload of associations bug was updated in Ruby on Rails
  • Paweł Kondzior
    Paweł Kondzior commented at 10:47 PM

    I thnik adding :preload_sql for has_many, has_one and has_and_belongs_to_many that will bypass preload_has_and_belongs_to_many_association method would be solut...

Sunday, November 16 2008
1381 default_scope patch was updated in Ruby on Rails
  • Paweł Kondzior
    Paweł Kondzior commented at 5:05 PM

    cattr_accessor wont work, it will fail all because it will define default_scope for ActiveRecord::Base not for Model that inherts from it. So class var isn't so...

  • Paweł Kondzior
    Paweł Kondzior commented at 4:43 PM

    Thread safe version.

  • Paweł Kondzior
    Paweł Kondzior commented at 2:51 PM

    default_scope with named_scope syntaxt.

    class Client < ActiveRecord::Base default_scope :order => 'name DESC' end