Sha256: 78ce207f1caa915a588d588c07858187c4cdee4a80159ef33a8668a380c4c1d3

Contents?: true

Size: 313 Bytes

Versions: 10

Compression:

Stored size: 313 Bytes

Contents

class Profile < ActiveRecord::Base
  serialize :modules
  validates_uniqueness_of :label

  ADMIN = 'admin'
  
  def modules
    read_attribute(:modules) || []
  end
  
  def modules=(perms)
    perms = perms.collect {|p| p.to_sym unless p.blank? }.compact if perms
    write_attribute(:modules, perms)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
typo-5.5 app/models/profile.rb
typo-5.4.4 app/models/profile.rb
typo-5.4.3 app/models/profile.rb
typo-5.4.2 app/models/profile.rb
typo-5.4.1 app/models/profile.rb
typo-5.4 app/models/profile.rb
typo-5.1.98 app/models/profile.rb
typo-5.2 app/models/profile.rb
typo-5.2.98 app/models/profile.rb
typo-5.3 app/models/profile.rb