lib/generators/app_themer/views/views_generator.rb in app-themer-0.4.1 vs lib/generators/app_themer/views/views_generator.rb in app-themer-0.4.6

- old
+ new

@@ -8,11 +8,11 @@ argument :model_name, :type => :string, :required => false class_option :layout, :type => :string, :desc => 'Specify the layout name' class_option :engine, :type => :string, :default => 'erb', :desc => 'Specify the template engine' class_option :will_paginate, :type => :boolean, :default => false, :desc => 'Specify if you use will_paginate' - class_option :view_type, :type => :string, :default => 'crud', :desc => 'Specify the theme type, crud or text. Default is crud' + class_option :view_type, :type => :string, :default => 'crud', :desc => 'Specify the type of view(s): crud, text or login.' def initialize(args, *options) super(args, *options) initialize_views_variables end @@ -92,9 +92,12 @@ '_sidebar.html.erb' => File.join('app/views', @controller_file_path, "_sidebar.html.#{options.engine}") }, 'text' => { 'text.html.erb' => File.join('app/views', @controller_file_path, "show.html.#{options.engine}"), '_sidebar.html.erb' => File.join('app/views', @controller_file_path, "_sidebar.html.#{options.engine}") + }, + 'login' => { + 'login.html.erb' => File.join('app/views', @controller_file_path, "new.html.#{options.engine}") } } selected_views = views[options.view_type] options.engine == 'haml' ? generate_haml_views(selected_views) : generate_erb_views(selected_views) end