Skip to content
This repository

Rails 2 compatibility #101

Closed
wants to merge 1 commit into from

3 participants

Andrew Kuklewicz Pelle Braendgaard Chris Rhoden
Andrew Kuklewicz

Fix use of railtie only for rails 3.x

Pelle Braendgaard
Owner
pelle commented

Thanks for this. Just merged in another fix for it.

Pelle Braendgaard pelle closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 24, 2011
Chris Rhoden Rails 2 compatibility 26265aa
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 10 additions and 12 deletions. Show diff stats Hide diff stats

  1. 22  lib/oauth-plugin.rb
22  lib/oauth-plugin.rb
@@ -5,18 +5,16 @@
5 5
 require 'oauth/controllers/application_controller_methods'
6 6
 if Rails.version =~ /^3\./
7 7
   require 'oauth/request_proxy/rack_request'
8  
-else
9  
-  require 'oauth/request_proxy/action_controller_request'
10  
-  ActionController::Base.send :include, OAuth::Controllers::ApplicationControllerMethods
11  
-end
12  
-
13  
-
14  
-module OAuth
15  
-  module Plugin
16  
-    class OAuthRailtie < Rails::Railtie
17  
-      initializer "oauth-plugin.configure_rails_initialization" do |app|
18  
-        ActionController::Base.send :include, OAuth::Controllers::ApplicationControllerMethods
  8
+  module OAuth
  9
+    module Plugin
  10
+      class OAuthRailtie < Rails::Railtie
  11
+        initializer "oauth-plugin.configure_rails_initialization" do |app|
  12
+          ActionController::Base.send :include, OAuth::Controllers::ApplicationControllerMethods
  13
+        end
19 14
       end
20 15
     end
21 16
   end
22  
-end
  17
+else
  18
+  require 'oauth/request_proxy/action_controller_request'
  19
+  ActionController::Base.send :include, OAuth::Controllers::ApplicationControllerMethods
  20
+end
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.