Sha256: a565c0cbad08c59220978ae7e31b21202e69393b115b6435fcaeea751e235aec
Contents?: true
Size: 491 Bytes
Versions: 38
Compression:
Stored size: 491 Bytes
Contents
# == Schema Information # # Table name: roles # # id :integer(4) not null, primary key # rolename :string(255) # created_at :datetime # updated_at :datetime # class Role < ActiveRecord::Base unloadable has_many :permissions has_many :users, :through => :permissions validates_presence_of :rolename # roles can be defined as symbols. We want to store them as strings in the database def rolename= val write_attribute(:rolename, val.to_s) end end
Version data entries
38 entries across 38 versions & 1 rubygems