lib/generators/scrivito/page/page_generator.rb in scrivito_sdk-0.50.1 vs lib/generators/scrivito/page/page_generator.rb in scrivito_sdk-0.60.0.rc1
- old
+ new
@@ -1,22 +1,11 @@
module Scrivito
module Generators
class PageGenerator < ::Rails::Generators::NamedBase
- include ::Rails::Generators::Migration
-
source_root File.expand_path('../templates', __FILE__)
- def self.next_migration_number(dirname)
- Scrivito::Migration.next_migration_number(current_migration_number(dirname))
- end
-
def create_model
template 'model.erb', "app/models/#{file_name}.rb"
- end
-
- def generate_migration
- migration_template 'migration.erb',
- File.join(Scrivito::Configuration.migration_path, "create_#{file_name}_migration.rb")
end
def create_controller
template 'controller.erb', "app/controllers/#{file_name}_controller.rb"
end