lib/shamu/attributes.rb in shamu-0.0.17 vs lib/shamu/attributes.rb in shamu-0.0.18

- old
+ new

@@ -44,9 +44,10 @@ # @return [Hash] of attributes def to_attributes( only: nil, except: nil ) self.class.attributes.each_with_object({}) do |(name, options), attrs| next if ( only && !match_attribute?( only, name ) ) || ( except && match_attribute?( except, name ) ) next unless serialize_attribute?( name, options ) + attrs[name] = send( name ) end end # Indicates if the object has an attribute with the given name. Aliased to