Class: UserNotification::Generators::NotificationGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- UserNotification::Generators::NotificationGenerator
- Extended by:
- Base
- Defined in:
- lib/generators/user_notification/notification/notification_generator.rb
Overview
Notification generator that creates notification model file from template
Instance Method Summary collapse
-
#generate_files ⇒ Object
Create model in project’s folder.
Methods included from Base
Instance Method Details
#generate_files ⇒ Object
Create model in project’s folder
12 13 14 |
# File 'lib/generators/user_notification/notification/notification_generator.rb', line 12 def generate_files copy_file 'notification.rb', "app/models/#{name}.rb" end |