Class: SessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SessionsController
- Defined in:
- lib/generators/acts_as_tumblr/templates/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 |
# File 'lib/generators/acts_as_tumblr/templates/sessions_controller.rb', line 9 def create render :text => "<pre>"+request.env["omniauth.auth"].to_yaml+"</pre>" end |
#failure ⇒ Object
13 14 15 |
# File 'lib/generators/acts_as_tumblr/templates/sessions_controller.rb', line 13 def failure render :text => "FAILURE :-(" end |
#new ⇒ Object
2 3 4 5 6 7 |
# File 'lib/generators/acts_as_tumblr/templates/sessions_controller.rb', line 2 def new logger.debug "params: #{params.inspect}" services = ['tumblr'] # TODO extract from OmniAuth.config links = services.sort.map{|service| "<li style='margin: 15px;'><a href='/auth/#{service}'>#{service}</a></li>" } render :text => "Authenticate with: <ul style='font-size: 20pt;'>#{links.join}</ul>", :layout => true end |