Sha256: f6a842b97a5aae032c81a2c0c321726ee2137971dfb6b883277fb0ee1378388f

Contents?: true

Size: 325 Bytes

Versions: 3

Compression:

Stored size: 325 Bytes

Contents

class Post < ActiveRecord::Base
  store :data, :accessors => [:show_date, :show_author, :background_color]

  attribute :show_date,         :type => :boolean,  :default => false
  attribute :show_author,       :type => :boolean,  :default => true
  attribute :background_color,  :type => :string,   :default => '#FFFFFF'
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stored_attribute-1.0.0 spec/support/models.rb
stored_attribute-0.0.2 spec/support/models.rb
stored_attribute-0.0.1 spec/support/models.rb