Sha256: 3e9211f949c699c83f92fe374b1e3a6624f26d8b01ffd48645328007b9c4e0f1

Contents?: true

Size: 176 Bytes

Versions: 13

Compression:

Stored size: 176 Bytes

Contents

class Role < ActiveRecord::Base
  has_and_belongs_to_many :users, :join_table => 'user_roles'

  def self.[](role)
    first(:conditions => ['name = ?', role.to_s ])
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
darkhelmet-role_on-0.1.1 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.1.2 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.1.3 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.1.4 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.2.0 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.2.1 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.2.2 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.2.3 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.2.4 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.2.5 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.2.6 generators/role_on/templates/app/models/role.rb
darkhelmet-role_on-0.2.7 generators/role_on/templates/app/models/role.rb
role_on-0.2.7 generators/role_on/templates/app/models/role.rb