Class: Scenic::Generators::View::CascadeGenerator
- Inherits:
-
Scenic::Generators::ViewGenerator
- Object
- Scenic::Generators::ViewGenerator
- Scenic::Generators::View::CascadeGenerator
- Defined in:
- lib/generators/scenic/view/cascade/cascade_generator.rb
Overview
Create a database view migration with re-creating of dependent views
Instance Method Summary collapse
Instance Method Details
#create_migration_file ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/scenic/view/cascade/cascade_generator.rb', line 12 def create_migration_file if creating_new_view? || migration_template('db/migrate/create_view.rb.erb', "db/migrate/create_#{plural_file_name}.rb") else migration_template('db/migrate/update_view.rb.erb', "db/migrate/update_#{plural_file_name}_to_version_#{version}.rb") end end |