Class: KaminariAdminTheme::ViewsGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_viewsObject



6
7
8
9
10
11
12
# File 'lib/generators/kaminari_admin_theme/views_generator.rb', line 6

def copy_views
  filename_pattern = File.join(self.class.source_root, "*.html.erb")

  Dir.glob(filename_pattern).map {|f| File.basename f}.each do |f|
    copy_file f, "app/views/kaminari/admin_theme/#{f}"
  end
end