Class: UserNotif::InstallGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- UserNotif::InstallGenerator
- Defined in:
- lib/generators/user_notif/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_user_notif_routes ⇒ Object
19 20 21 |
# File 'lib/generators/user_notif/install_generator.rb', line 19 def add_user_notif_routes route "put '/user_notif/:id', to: 'user_notif/notifs#read', as: :read_user_notif" end |
#copy_files ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/generators/user_notif/install_generator.rb', line 11 def copy_files migration_template 'create_notifs.rb', 'db/migrate/create_notifs.rb' copy_file 'initializer.rb', 'config/initializers/user_notif.rb' copy_file 'notifs_controller.rb', 'app/controllers/user_notif/notifs_controller.rb' copy_file 'locales/fr.yml', 'config/locales/user_notif.fr.yml' copy_file 'locales/en.yml', 'config/locales/user_notif.en.yml' end |