class OauthConsumerGenerator
Public Instance Methods
add_route()
click to toggle source
# 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', :via => [:get, :post, :put, :delete] end end ROUTE end
copy_controller()
click to toggle source
# 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()
click to toggle source
# 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