[Rails] default_scope and scoped_methods in 2.2.2 ?

2009-08-28 Thread throwern
I am running rails 2.2.2 and cannot upgrade to 2.3 at this time. However, I would like to use a default_scope and so I have installed the default_scope plugin. This works great for standard AR classes but does not carry through Single Table Inheritance without adding the default_scope declaration

[Rails] Re: has_one :through doesn't work in Rails 2.2.2

2009-01-16 Thread throwern
I was having the same issue as Clive trying to test the referenced example I was able to get some functionality by using :has_one subscription rather than :has_many. I do have a question though. I can set the through association like this user=User.create(:name=>"Bob") m=Magazine.create(:name

[Rails] has_one :through and update_attributes

2009-01-16 Thread throwern
I'm wondering about the difference between update_attributes(:method) and class.method= I have setup an example similar to the one here: http://ryandaigle.com/articles/2008/3/24/what-s-new-in-edge-rails-has-one-through The main difference is that I use a has_one instead of has_many for my has_on