Displaying 1 result from an estimated 1 matches for "_or_create".
Did you mean:
_dm_create
2006 Mar 14
1
Dynamic Finders with _or_create Don''t Work?
What could cause this?
>> sdfl=PartNumber.find_by_part_number("1111111")
=> #<PartNumber:0xb78fc744 @attributes={"id"=>"11601",
"part_number"=>"1111111"}>
>> sdfl=PartNumber.find_or_create_by_part_number("1111111")
NoMethodError: undefined method `find_or_create_by_part_number'' for
PartNumber:Class
from /usr/lib/ruby/gems/1.8/gems/activerecord-1.12.2/lib/active_record/base.rb:942:in
`method_missing''
from (irb):5
I could swear this used to...