Sha256: 52ec0a4a3ce02b48220b80c52dd0b13450eda4aa4526ecb0692af59d11325aab
Contents?: true
Size: 1.07 KB
Versions: 4
Compression:
Stored size: 1.07 KB
Contents
class Puffer::SessionsDeviseBase < Puffer::SessionsBase # include Devise::Controllers::InternalHelpers # GET /resource/sign_in # def new # @record = User.new # end # POST /resource/sign_in # def create # @record = warden.authenticate!(:scope => :user, :recall => "#{controller_path}#new") # sign_in(user, @record) # respond_with @record, :location => params[:return_to] # end # GET /resource/sign_out # def destroy # signed_in = signed_in?(resource_name) # Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name) # set_flash_message :notice, :signed_out if signed_in # # 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 after_sign_out_path_for(resource_name) } # format.all do # method = "to_#{request_format}" # text = {}.respond_to?(method) ? {}.send(method) : "" # render :text => text, :status => :ok # end # end # end end
Version data entries
4 entries across 4 versions & 1 rubygems