D
Dean
I have a rails app (so maybe this is a question for the rails list) that
uses a temperature class I also wrote. When the app goes to save a new
record, I get this error message.
undefined method `convert_to' for false:FalseClass
Why is convert_to being passed a flase object? The method is:
def ==(t_obj)
@temp == t_obj.convert_to(@units).temp
end
the convert_to method converts a temperature object to the requested
units (C, F, K).
It is coming from:
#{RAILS_ROOT}/app/models/temperature.rb:82:in `=='
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/callbacks.rb:248:in
`create_or_update'
<snip>
Regards,
--Dean
uses a temperature class I also wrote. When the app goes to save a new
record, I get this error message.
undefined method `convert_to' for false:FalseClass
Why is convert_to being passed a flase object? The method is:
def ==(t_obj)
@temp == t_obj.convert_to(@units).temp
end
the convert_to method converts a temperature object to the requested
units (C, F, K).
It is coming from:
#{RAILS_ROOT}/app/models/temperature.rb:82:in `=='
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/callbacks.rb:248:in
`create_or_update'
<snip>
Regards,
--Dean