Sha256: 98424717f2073ec76e97a584aaa98d78b6cf1deebe020c7b701fdbbf1acfafc2
Contents?: true
Size: 351 Bytes
Versions: 16
Compression:
Stored size: 351 Bytes
Contents
class UserGroup < ActiveRecord::Base has_and_belongs_to_many :permissions has_and_belongs_to_many :users validates_presence_of :name def all_users User.find_by_sql <<-SQL select users.* from users, user_groups_users where users.id = user_groups_users.user_id and user_groups_users.user_group_id = #{self.id} SQL end end
Version data entries
16 entries across 16 versions & 1 rubygems