Class: ActiveadminBlog::Generators::ViewsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActiveadminBlog::Generators::ViewsGenerator
- Defined in:
- lib/generators/activeadmin_blog/views_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_default_views ⇒ Object
8 9 10 11 12 13 |
# File 'lib/generators/activeadmin_blog/views_generator.rb', line 8 def copy_default_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/activeadmin_blog/posts/#{f}" end end |