spec/support/models/user.rb in grape-active_model_serializers-1.3.1 vs spec/support/models/user.rb in grape-active_model_serializers-1.3.2
- old
+ new
@@ -1,10 +1,10 @@
class User
include ActiveModel::SerializerSupport
attr_accessor :first_name, :last_name, :password, :email
- def initialize(params={})
- params.each do |k,v|
+ def initialize(params = {})
+ params.each do |k, v|
instance_variable_set("@#{k}", v) unless v.nil?
end
end
end