Displaying 6 results from an estimated 6 matches for "after_sign_in_path_for".
2014 May 13
0
super is not working on after_sign_in_path_for(resource)
I have this:
class Users::SessionsController < Devise::SessionsController
def after_sign_in_path_for(resource)
super
end
super redirect to root_path and i dont want to do it. I need to redirect
other view
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send a...
2011 Jun 05
1
Cancan redirect back at AccessDenied
...env["HTTP_REFERER"].
I can''t really understand why there is no http_referer, how is back
button working on views? Is it possible to implement a general back
action for the cancan access denied exception?
I like the devise approach of "back" method after sign in:
def after_sign_in_path_for(resource)
stored_location_for(resource)
end
It would be perfect if I could combine them.
Thank you!
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/...
2011 Nov 02
1
getting devise to return json data when signing out
...rce_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_in_path_for(resource)}
end
def failure
return render :json => {:success => false, :errors => ["Login
failed."]}
end
def logged_in
return render :json => {:success => false, :errors => ["Already
logged in."]}
end
However, once they are logged...
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..."
2011 Sep 13
0
need help with session
hi,
im having a hard time to see thru here:
after login , i see a different session_id then then one i saw on the
login-view. but what throws me off is, that i do store the sessionid
in the db here:
def after_sign_in_path_for(resource)
end
section of the application-controller. problem is that the values is
always the one from the ''old''/previous session.
any ideas?
im a bit lost right now
thx
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"...
2012 Feb 01
6
Does Devise make use of a "status" method? Weird bug.
...POST /resource/sign_in
def create
resource = warden.authenticate!(:scope => resource_name, :recall =>
"#{controller_path}#new")
set_flash_message(:notice, :signed_in) if is_navigational_format?
sign_in(resource_name, resource)
respond_with resource, :location => after_sign_in_path_for(resource)
end
This is Devise 2.0.0 on a Rails 3.1 app, Ruby 1.9.2p136. I''m just
realizing, as I go googling around, just how new this version of Devise
is. I may need to back out a bit.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribe...