search for: resource_or_scop

Displaying 2 results from an estimated 2 matches for "resource_or_scop".

Did you mean: resource_or_scope
2011 Nov 02
1
getting devise to return json data when signing out
...ors => ["Already logged in."]} end resource = warden.authenticate!(:scope => resource_name, :recall => "#{controller_path}#failure") return sign_in_and_redirect(resource_name, resource) } end end def sign_in_and_redirect(resource_or_scope, resource=nil) scope = Devise::Mapping.find_scope!(resource_or_scope) resource ||= resource_or_scope sign_in(scope, resource) unless warden.user(scope) == resource return render :json => { :success => true, :redirect => stored_location_for(scope) || after_sign_...
2010 Nov 12
1
Devise after_sign_up_path_for - how to?
Hi, I''m new to devise and I''m having a problem overwriting a controller. After sign-up I want the user to go to a static page. In the controllers folder I have created users/registrations_controller.rb class Users::RegistrationsController < Devise::RegistrationsController def after_sign_up_path_for(resource) puts "If I coould see this..."