lib/zelda/base.rb in zelda-1.2.1 vs lib/zelda/base.rb in zelda-1.3.0
- old
+ new
@@ -5,10 +5,14 @@
def initialize(attributes={})
@attributes = attributes
@attributes.each_pair do |key, value|
self.class.send(:define_method, key) do
- @attributes[key]
+ if @attributes[key].is_a?(String)
+ @attributes[key].force_encoding("UTF-8")
+ else
+ @attributes[key]
+ end
end
end
end
end
end
\ No newline at end of file