Class: UserGroup

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/user_group.rb

Overview

Schema Information

Table name: user_groups

 id         :integer(4)      not null, primary key
 name       :string(255)
 created_at :datetime
 updated_at :datetime

Instance Method Summary

Instance Method Details

- (Object) all_users



22
23
24
# File 'app/models/user_group.rb', line 22

def all_users
  User.find_by_sql "select users.*\nfrom users, user_groups_users\nwhere users.id = user_groups_users.user_id\nand user_groups_users.user_group_id = \#{self.id}\n"
end