Class: ActivityNotification::Generators::NotificationGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- ActivityNotification::Generators::NotificationGenerator
- Defined in:
- lib/generators/activity_notification/notification/notification_generator.rb
Overview
Notification generator to create customizable notification model from templates.
Instance Method Summary collapse
-
#create_models ⇒ Object
Create notification model in application directory.
Instance Method Details
#create_models ⇒ Object
Create notification model in application directory
14 15 16 17 |
# File 'lib/generators/activity_notification/notification/notification_generator.rb', line 14 def create_models @model_name = name template 'notification.rb', "app/models/#{name.underscore}.rb" end |