Is there a way to link to sign_in with a specified after_sign_in redirect?
I have a public page showing some resources, but the user needs to sign in if they want to comment
I currently have a 'sign in to comment' link which just points to
is there something like that built in? If not - what would be the cleanest way to go about it?
I currently have a 'sign in to comment' link which just points to
new_user_session_path
What I'd like is a link with something likelink_to, new_user_session_path(then_redirect_back_to: this_path), "Sign in to comment"
is there something like that built in? If not - what would be the cleanest way to go about it?
thanks for the response. I did think about that - but I don't really have a new_coment_path. That's a post method for any 'commentable' resource.
the place that I want them to be redirected to is commentable_resource#show
which itself doesn't require a login
I could create a commentable_resource#show_with_login route if necessary
but I thought there might be a cleaner solution...
the place that I want them to be redirected to is commentable_resource#show
which itself doesn't require a login
I could create a commentable_resource#show_with_login route if necessary
but I thought there might be a cleaner solution...
Notifications
You’re not receiving notifications from this thread.