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:inmethod_missing’
from (irb):5
Anyone? This is kinda disturbing to me. Am I the only person who has
ever seen this? If the find_by works, shouldn’t the find_or_create_by
also at least try to work? My setup is plain vanilla. PartNumber only
has one attribute, part_number besides the id.
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:inmethod_missing’
from (irb):5
I could swear this used to work.
Ian
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.