search for: sign_out_all_scop

Displaying 1 result from an estimated 1 matches for "sign_out_all_scop".

Did you mean: sign_out_all_scopes
2011 Nov 02
1
getting devise to return json data when signing out
...users/session controller: def destroy respond_to do |format| format.json { return sign_out_and_redirect(resource_or_scope) } end end def sign_out_and_redirect(resource_or_scope) scope = Devise::Mapping.find_scope!(resource_or_scope) if Devise.sign_out_all_scopes sign_out_all_scopes else sign_out(scope) end return render :json => {:status => :signed_out} end I get a "udefined method or variable resource_or_scope". The problem is if i define this sign_out_and_redirect method in the application co...