hassox (owner)

Revisions

gist: 111424 Download_button fork
public
Public Clone URL: git://gist.github.com/111424.git
Embed All Files: show embed
application_controller.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Application < ActionController::Base
 
 
  private
  def selectable_authenticate!
    auth_type = case params[:auth_type]
    when "openid"
      :openid
    else
      :password
    end
    authenticate! auth_type
  end
    
end
foo_controller.rb #
1
2
3
4
5
6
class FooController < Application
  before_filter :selectable_authenitcate!
  
  # snip
  
end