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

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -