Class: Hancock::Catalog::ViewsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/hancock/catalog/views/views_generator.rb

Instance Method Summary collapse

Instance Method Details

#viewsObject



9
10
11
12
13
# File 'lib/generators/hancock/catalog/views/views_generator.rb', line 9

def views
  (views_args == ['all'] ? permitted_file_views : ((views_args & permitted_path_views).map { |v| permitted_file_views(v) }.flatten)).each do |v|
    copy_file "#{v}.html.slim", "app/views/hancock/catalog/#{v}.html.slim"
  end
end