Class: RailsPageComment::Generators::MailerViewsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- RailsPageComment::Generators::MailerViewsGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/rails_page_comment/mailer_views_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#copy_views ⇒ Object
copy configuration.
Class Method Details
.next_migration_number(dirname) ⇒ Object
15 16 17 |
# File 'lib/generators/rails_page_comment/mailer_views_generator.rb', line 15 def self.next_migration_number(dirname) Time.now.strftime("%Y%m%d%H%M%S") end |
.source_root ⇒ Object
11 12 13 |
# File 'lib/generators/rails_page_comment/mailer_views_generator.rb', line 11 def self.source_root @source_root ||= File.(File.join(File.dirname(__FILE__), 'templates')) end |
Instance Method Details
#copy_views ⇒ Object
copy configuration
20 21 22 |
# File 'lib/generators/rails_page_comment/mailer_views_generator.rb', line 20 def copy_views template "mailer/notice_changes.html.erb", "app/views/#{rails_page_comment_dir}/notify_changes/notice_changes.html.erb" end |