Displaying 2 results from an estimated 2 matches for "neerajdotname".
2010 May 12
16
In development mode not all types are included in the query related to type
class User
end
class Agent < User
end
script/console production
User.find_by_name ''john''
SELECT "people".* FROM "people" WHERE ((("people"."type" = ''User'' OR
"people"."type" = ''Manager'') OR "people"."type" = ''Agent'')) AND
2010 May 14
1
select method on ActiveRecord::Relation brakes enumeration
class Brake
scope :good, where(:quality => ''good'')
end
Brake.all.select &:nil? #=> works fine
Brake.good.select &:nil? #=> FAILS
Last statement fails because Brake.good.select is returning
ActiveRecord::Relation and not an array.
I have posted a detailed discussion on ticket #4589 .