lib/generators/cms/admin_area_generator.rb in honey-cms-0.3.10 vs lib/generators/cms/admin_area_generator.rb in honey-cms-0.3.11

- old
+ new

@@ -15,10 +15,13 @@ empty_directory 'app/models/cms' CMS::Configuration.scoped_types(options).each do |type| @name = (@type = type).model_name template 'type_controller.rb', "app/controllers/cms/#{@name.collection}_controller.rb" - template 'type_model.rb', "app/models/cms/#{@name.element}.rb" + + if @type.options[:model] + template 'type_model.rb', "app/models/cms/#{@name.element}.rb" + end %w(index new show edit _fields).each do |view| template "views/#{view}.html.haml", "app/views/cms/#{@name.collection}/#{view}.html.haml" end end