Rails undefined method 'to_i' -
Rails undefined method 'to_i' -
when user creates new worequest, want set worequest.statuscode_id first entry in statuscodes table.
the next (from worequest.rb) working in rails 3.1 i've upgraded 3.2, it's not working.
after_initialize :defaults def defaults self.statuscode_id ||= statuscode.first end
i
undefined method `to_i' #<statuscode:0x007fe934b67bd0>
any thought why doesn't work now? know work?
thanks!
ruby-on-rails-3
Comments
Post a Comment