Sha256: e759d7ba18b5385668d5d0f2a7c8e0df88214d0048f2cb66c8e13fd419922711

Contents?: true

Size: 841 Bytes

Versions: 3

Compression:

Stored size: 841 Bytes

Contents

class User < ActiveRecord::Base

  belongs_to :account
  has_one :subscription

  attr_accessible :name, :email
  attr_accessible :tw_share, :fb_share, :tb_share, :status, :location, :percentage, :permissions, :mystery, :notifications

  has_serialized :settings do |settings|
    settings.define :tw_share, :default => true, :type => :boolean
    settings.define :fb_share, :default => true, :type => :boolean
    settings.define :tb_share, :default => true, :type => :boolean

    settings.define :status, :default => :user, :type => :symbol
    settings.define :location, :type => :string

    settings.define :percentage, :default => 0.0, :type => :float

    settings.define :permissions, :default => [], :type => :array

    settings.define :mystery

    settings.define :notifications, :type => :boolean, :default => false
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
serializer-1.0.2 test/dummy/app/models/user.rb
serializer-1.0.1 test/dummy/app/models/user.rb
serializer-1.0.0 test/dummy/app/models/user.rb