lib/generators/scrivito/page/page_generator.rb in scrivito_sdk-0.66.0 vs lib/generators/scrivito/page/page_generator.rb in scrivito_sdk-0.70.0.rc1
- old
+ new
@@ -1,9 +1,12 @@
module Scrivito
module Generators
class PageGenerator < ::Rails::Generators::NamedBase
source_root File.expand_path('../templates', __FILE__)
+ argument :name, type: :string
+ argument :attributes, type: :array, default: [], banner: 'attribute:type attribute:type'
+
def create_model
template 'model.erb', "app/models/#{file_name}.rb"
end
def create_controller