Sha256: 6ed134f09e0613893daf7851a742e9d38101492e5ef6569c9d49dcc429c05442
Contents?: true
Size: 1.24 KB
Versions: 2
Compression:
Stored size: 1.24 KB
Contents
class CreateExtremeAasTables < ActiveRecord::Migration def change create_table :extreme_profiles do |t| t.timestamps end create_table :extreme_grants do |t| t.references :extreme_profile t.references :extreme_action t.boolean :volatile t.timestamps end create_table :extreme_actions do |t| t.references :actionable, :polymorphic => true t.timestamps end create_table :extreme_simple_actions do |t| #-------- t.string :controller_name t.string :action_name #-------- t.string :helper_name t.string :method_name #-------- t.timestamps end create_table :extreme_action_groups do |t| t.string :name t.boolean :volatile t.timestamps end create_table :extreme_action_edges do |t| t.integer :child_action_id t.integer :parent_action_id t.timestamps end ############## DEFAULT PROFILE ############## # default profile will have always id = 1 profile = ExtremeAas::ExtremeProfile.create :id => 1 grant = ExtremeAas::ExtremeActionGroup.create :name => 'default' profile.give_permission grant.super_action ############################################# end end
Version data entries
2 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
extreme_aas-0.0.2 | lib/generators/extreme_aas/templates/migration.rb |
extreme_aas-0.0.2 | spec/dummy/db/migrate/20120419100824_create_extreme_aas_tables.rb |