Class: InstallRoled

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/roled/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/roled/templates/migration.rb', line 2

def change
  create_table :acos do |t|
 t.string :parent
 t.string :action
  end
  create_table :aros do |t|
    t.integer :foreign_id
    t.string :model
  end
  create_table :acos_aros do |t|
    t.belongs_to :aro
    t.belongs_to :aco
    t.boolean :allowed
  end
end