Sha256: ad12a076df5a6fccce9877f6caa69172175a53a03e004b37b02edb3806312992

Contents?: true

Size: 237 Bytes

Versions: 7

Compression:

Stored size: 237 Bytes

Contents

class User
  include ActiveModel::SerializerSupport
  attr_accessor :first_name, :last_name, :password, :email

  def initialize(params={})
    params.each do |k,v|
      instance_variable_set("@#{k}", v) unless v.nil?
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
grape-active_model_serializers-1.3.1 spec/support/models/user.rb
grape-active_model_serializers-1.2.1 spec/support/models/user.rb
grape-active_model_serializers-1.2.0 spec/support/models/user.rb
grape-active_model_serializers-1.1.0 spec/support/models/user.rb
grape-active_model_serializers-revibe-1.0.1 spec/support/models/user.rb
grape-active_model_serializers-1.0.1 spec/support/models/user.rb
grape-active_model_serializers-1.0.0 spec/support/models/user.rb