Class: RailsPageComment::Generators::MailerViewsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/rails_page_comment/mailer_views_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

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_rootObject



11
12
13
# File 'lib/generators/rails_page_comment/mailer_views_generator.rb', line 11

def self.source_root
  @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
end

Instance Method Details

#copy_viewsObject

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