Class: Comments::Generators::ViewsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Comments::Generators::ViewsGenerator
- Defined in:
- lib/generators/comments/views_generator.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#copy_views ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/comments/views_generator.rb', line 9 def copy_views %w(comments).each do |fname| path = "#{Rails.root}/app/views/comments" if File.exists?(path) puts "Skipping app/views/comments creation, as file already exists!" else puts "Adding views..." directory "comments/", path end end end |