Supose I have a simple has_many relationship betwen model_1 and
class Model1 < ActiveRecord::Base
class Model2 < ActiveRecord::Base
Now, I create an instance of Model2 through the relationship:
m1 = Model1.first
m2 = m1.models_2.new
Now, if I want to ask for the size of the relationship, there's a huge
difference between Rails 3.0.x and Rails 3.1.
Following the previous example, in Rails 3.0.x i get:
This means, new objects are not being considered
This exact same query in Rails 3.1:
So, the solution is:
If I have to change ALL my relationships with .all, I'm in a big
trouble... am I missing something?
Thank you very much.