Class: ActivityNotification::Generators::ViewsGenerator

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

Overview

Include this module in your generator to generate ActivityNotification views. copy_views is the main method and by default copies all views with forms.

Instance Method Summary collapse

Instance Method Details

#copy_views ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/generators/activity_notification/views_generator.rb', line 17

def copy_views
  if options[:views]
    options[:views].each do |directory|
      view_directory directory.to_sym
    end
  else
    view_directory :notifications
    view_directory :mailer
  end
end