Sha256: ce9deac138156a1cf322f8a42dabe7a0d12f8e1301b686c8be5e1fef41f733a5

Contents?: true

Size: 212 Bytes

Versions: 7

Compression:

Stored size: 212 Bytes

Contents

class BlogPost
  include ActiveModel::SerializerSupport
  attr_accessor :title, :body

  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/blog_post.rb
grape-active_model_serializers-1.2.1 spec/support/models/blog_post.rb
grape-active_model_serializers-1.2.0 spec/support/models/blog_post.rb
grape-active_model_serializers-1.1.0 spec/support/models/blog_post.rb
grape-active_model_serializers-revibe-1.0.1 spec/support/models/blog_post.rb
grape-active_model_serializers-1.0.1 spec/support/models/blog_post.rb
grape-active_model_serializers-1.0.0 spec/support/models/blog_post.rb