Sha256: 8ccf9290403293cfb36008c8b4343933f6e6625056aa35c844bfdd8e03a7b3e4
Contents?: true
Size: 450 Bytes
Versions: 97
Compression:
Stored size: 450 Bytes
Contents
module Goldberg class RolesPermission < ActiveRecord::Base include Goldberg::Model validates_presence_of :role_id, :permission_id def RolesPermission.find_for_role(role_ids) querystr = <<-END select rp.*, p.name from #{prefix}roles_permissions rp inner join #{prefix}permissions p on rp.permission_id = p.id where role_id in (?) order by p.name END return find_by_sql([querystr, role_ids]) end end end
Version data entries
97 entries across 97 versions & 2 rubygems