Sha256: 36c1435db39031c0edb539f8e52f75d5956d29ff7ef8785ad994eccda5c90b07
Contents?: true
Size: 382 Bytes
Versions: 18
Compression:
Stored size: 382 Bytes
Contents
class <%= role_cname.camelize %> < ActiveRecord::Base <% if need_table_prefix?(role_cname) %> def self.table_name_prefix <%= table_prefix(role_cname) %>_ end <% end %> has_and_belongs_to_many :<%= user_cname.tableize %>, :join_table => :<%= "#{table_name(user_cname, true)}_#{table_name(role_cname, true)}" %> belongs_to :resource, :polymorphic => true scopify end
Version data entries
18 entries across 18 versions & 2 rubygems