2010-05-10 22:39:52 +00:00
|
|
|
module Admin
|
|
|
|
class SessionsController < Devise::SessionsController
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
include Locomotive::Routing::SiteDispatcher
|
2010-04-22 23:52:11 +00:00
|
|
|
|
2010-09-21 11:16:39 +00:00
|
|
|
layout '/admin/layouts/box'
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
before_filter :require_site
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-10-27 00:11:44 +00:00
|
|
|
helper 'admin/base', 'admin/box'
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
protected
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
def after_sign_in_path_for(resource)
|
2012-03-03 15:25:00 +00:00
|
|
|
stored_location_for(resource) || admin_pages_url
|
2010-05-10 22:39:52 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2011-04-24 23:21:38 +00:00
|
|
|
def after_sign_out_path_for(resource)
|
|
|
|
request.protocol + request.host_with_port
|
|
|
|
end
|
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
end
|