Class: Vitrage::Generators::InstallGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Defined in:
lib/generators/vitrage/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_routesObject



21
22
23
# File 'lib/generators/vitrage/install_generator.rb', line 21

def add_routes
  route "Vitrage.routes(self)"
end

#copy_vitrage_piece_model_fileObject



12
13
14
# File 'lib/generators/vitrage/install_generator.rb', line 12

def copy_vitrage_piece_model_file
  copy_file "vitrage_slot.rb", "app/models/vitrage_owners_pieces_slot.rb"
end

#create_vitrage_piece_migrationObject



16
17
18
19
# File 'lib/generators/vitrage/install_generator.rb', line 16

def create_vitrage_piece_migration
  migration_template "migrations/create_vitrage_slots.rb",
                     "db/migrate/create_vitrage_owners_pieces_slots.rb"
end