Skip to content

Instantly share code, notes, and snippets.

View holden's full-sized avatar

Holden Thomas holden

View GitHub Profile
@stammy
stammy / application_controller.rb
Created April 23, 2011 09:36 — forked from aliang/application_controller.rb
Force SSL on Devise routes only, then redirect back
class ApplicationController < ActionController::Base
# Tell Devise to redirect after sign_in
def after_sign_in_path_for(resource_or_scope)
some_url(:protocol => 'http')
end
# Tell Devise to redirect after sign_out
def after_sign_out_path_for(resource_or_scope)
some_url(:protocol => 'http')
end