Class: OauthConsumerGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- OauthConsumerGenerator
- Defined in:
- lib/generators/oauth_consumer/oauth_consumer_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_route ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/generators/oauth_consumer/oauth_consumer_generator.rb', line 19 def add_route route <<-ROUTE.strip resources :oauth_consumers do member do get :callback get :callback2 match 'client/*endpoint' => 'oauth_consumers#client' end end ROUTE end |
#copy_controller ⇒ Object
13 14 15 |
# File 'lib/generators/oauth_consumer/oauth_consumer_generator.rb', line 13 def copy_controller template 'controller.rb', File.join('app', 'controllers', 'oauth_consumers_controller.rb') end |
#copy_models ⇒ Object
9 10 11 |
# File 'lib/generators/oauth_consumer/oauth_consumer_generator.rb', line 9 def copy_models template 'oauth_config.rb', File.join('config', 'initializers', 'oauth_consumers.rb') end |