Commit 90983ca7 by liyijie

Fix Ohm wrong data attributes

parent 5ae6dd0b
...@@ -83,7 +83,16 @@ module WeatherModel ...@@ -83,7 +83,16 @@ module WeatherModel
super.select{ |x| x.attributes.empty?}.map(&:delete) super.select{ |x| x.attributes.empty?}.map(&:delete)
super super
end end
# # Write the dictionary of key-value pairs to the model.
def method_missing(method, *args)
if method.to_s.end_with? '='
self.class.attribute method.to_s.delete('=')
else
super
end
end
def self.type_proc type def self.type_proc type
case type case type
when :integer when :integer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment