Class: Hello::UsersGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hello::UsersGenerator
- Defined in:
- lib/generators/hello/users/users_generator.rb
Instance Method Summary collapse
Instance Method Details
#append_the_routes ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/hello/users/users_generator.rb', line 8 def append_the_routes route %( resources :users, only: [:index, :show, :new, :create] do collection do get 'list' end member do post 'impersonate' end end ) end |
#copy_the_files ⇒ Object
4 5 6 |
# File 'lib/generators/hello/users/users_generator.rb', line 4 def copy_the_files directory 'app' end |