Sha256: 00cd4f9c3def7878da4ddb0133bb39a7d96f860d68a4e5c4995e8be8174b6970
Contents?: true
Size: 902 Bytes
Versions: 28
Compression:
Stored size: 902 Bytes
Contents
module Carnival class SessionsController < Devise::SessionsController layout "carnival/admin" def create resource = warden.authenticate!(:scope => resource_name, :recall => "#{controller_path}#new") set_flash_message(:success, :signed_in) if is_navigational_format? redirect_to admin_root_url end def destroy redirect_path = after_sign_out_path_for(resource_name) signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)) set_flash_message :success, :signed_out if signed_out && is_navigational_format? # We actually need to hardcode this as Rails default responder doesn't # support returning empty response on GET request respond_to do |format| format.any(*navigational_formats) { redirect_to redirect_path } format.all do head :no_content end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems