Class: ActivityNotification::Generators::ViewsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActivityNotification::Generators::ViewsGenerator
- Defined in:
- lib/generators/activity_notification/views_generator.rb
Overview
View generator to copy customizable view files to rails application. Include this module in your generator to generate ActivityNotification views. ‘copy_views` is the main method and by default copies all views of ActivityNotification.
Constant Summary collapse
- VIEWS =
[:notifications, :mailer, :subscriptions, :optional_targets].freeze
Instance Method Summary collapse
-
#copy_views ⇒ Object
Copies view files in application directory.
Instance Method Details
#copy_views ⇒ Object
Copies view files in application directory
29 30 31 32 33 34 |
# File 'lib/generators/activity_notification/views_generator.rb', line 29 def copy_views target_views = [:views] || VIEWS target_views.each do |directory| view_directory directory.to_sym end end |