Save 36% for Black Friday! Save 36% on GoRails for Black Friday! Learn more
Activity
Posted in Is anyone using Rails 5 yet?
The setup guides on the site recommend using Rails 4.2.6. I'm curious to know if we should be using Rails 5 now as it's been out for almost a month?
Cheers
I've declared custom routes in my app for a few of the devise actions, they are as follows:
devise_scope :user do
get 'signup', to: 'devise/registrations#new', as: :signup
get 'login', to: 'devise/sessions#new', as: :login
get 'logout', to: 'devise/sessions#destroy', as: :logout
get 'forgotten', to: 'devise/passwords#new', as: :forgotten
get 'resend-confirmation', to: 'devise/confirmations#new', as: :resendconfirmation
end
However, when an unauthenticated user accesses a protected part of my site still gets redirected to /users/sign_in
. How do I get devise to use my custom routes inside of the authenticate_user!
before_action
? to keep the whole experience of using my app the same.
Thanks all.
I would like to know how i can change the redirect path so that when my editing a user fails it redirects back to users/edit
and not to /users
.
To replicate this i am entering a duplicate email address, entering the password. When my app checks the email it comes back as failed. You will see the page is localhost:3000/users
Any help or advise would be much appreciated thanks :D
Alan
Posted in Advanced management (DEVISE) profiles.
I am not too sure about the editing of your user profiles, I am still pretty new to Rails myself. - If i find any other info i will let you know.
The Devise docs should help you with editing a user's password: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-edit-their-password
This may help you create a delete link you asked for...
<%= link_to "Cancel my account", registration_path(current_user), data: { confirm: "Are you sure?" }, method: :delete %>
Posted in Setup MacOS 10.11 El Capitan Discussion
@excid3:disqus i opened up my .bash_profile and it had that line multiple times I removed them and I added the one you mentioned above and i get an error - -bash: .bash_profile: line 2: syntax error: unexpected end of file
Posted in Setup MacOS 10.11 El Capitan Discussion
I'm
Not sure mate, that's all I did. Copied the first line. Pasted. Hit enter.
Then copied the second line. Pasted that. Hit enter again. It's this bit that brings up the error
I saw on stack overflow someone mentioned a ; after the fi
Posted in Setup MacOS 10.11 El Capitan Discussion
Hi Chris,
Could we get the page updated to be a bit clearer?
I'm still not 100% what I need to do in that step. Or should I just edit the .bash_profile file?
Posted in Setup MacOS 10.11 El Capitan Discussion
Did you get this fixed? i too am getting this error