1 require "oauth/controllers/provider_controller"
2 require "oauth/rack/oauth_filter"
4 Rails.configuration.middleware.use OAuth::Rack::OAuthFilter
10 request.request_method
17 module ProviderController
18 def self.prepended(mod)
19 mod.singleton_class.prepend(OpenStreetMap::ProviderController::ClassMethods)
22 def render(options = {})
23 text = options.delete(:text)
25 super options.merge(:plain => text)
26 elsif options.delete(:nothing)
27 status = options.delete(:status) || :ok
35 def included(controller)
36 controller.class_eval do
37 def self.before_filter(*names, &blk)
38 before_action(*names, &blk)
41 def self.skip_before_filter(*names, &blk)
42 skip_before_action(*names, &blk)
52 OAuth::Controllers::ProviderController.prepend(OpenStreetMap::ProviderController)