test/fixtures/poro.rb in active_model_serializers-0.10.1 vs test/fixtures/poro.rb in active_model_serializers-0.10.2

- old
+ new

@@ -6,11 +6,11 @@ ### Helper methods, not required to be serializable # Convenience when not adding @attributes readers and writers def method_missing(meth, *args) if meth.to_s =~ /^(.*)=$/ - attributes[$1.to_sym] = args[0] + attributes[Regexp.last_match(1).to_sym] = args[0] elsif attributes.key?(meth) attributes[meth] else super end @@ -62,10 +62,10 @@ Tag = Class.new(Model) VirtualValue = Class.new(Model) Comment = Class.new(Model) do # Uses a custom non-time-based cache key def cache_key - "#{self.class.name.downcase}/#{self.id}" + "#{self.class.name.downcase}/#{id}" end end class Employee < ActiveRecord::Base has_many :pictures, as: :imageable