Sha256: 7593482f3421a7a6114124392c3b039563bc7bd12cab99ab232a82e8ae44abee
Contents?: true
Size: 487 Bytes
Versions: 9
Compression:
Stored size: 487 Bytes
Contents
class RolifyCreate<%= role_cname.camelize %> < ActiveRecord::Migration def change create_table(<%= role_cname.tableize.to_sym %>) do |t| t.string :name t.references :resource, :polymorphic => true t.timestamps end create_table(<%= (user_cname.tableize + "_" + role_cname.tableize).to_sym %>, :id => false) do |t| t.references :<%= user_cname.underscore.singularize %> t.references :<%= role_cname.underscore.singularize %> end end end
Version data entries
9 entries across 9 versions & 1 rubygems