devise administrating users

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

devise administrating users

fugee ohu
How do I edit users when i have devise_for :users and resources :users I have a users controller with it's own whitelist and then I can whitelist for devise in application_controller.rb What's the status of the crud users controller and it's whitelist? I've been trying to edit a user but the changes don't take It says user was successfully updated but then when I click edit again nothing's changed

--
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 an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d8931cf8-d7f8-4523-aaa8-ee3fbf4d44b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: devise administrating users

Walter Lee Davis
The order of inclusion in the routes file is important here. If you have:

devise_for :users

[followed by]

resources :users

...then the rake routes command will show you that the `user PATCH` path will be handled by the users_controller. If you have those two in the opposite order, then you will see that `users PATCH` (note the plural) will be handled by the devise_controller, and the path will be named users_registration.

What do you see when you rake routes in your application? You may also need to restrict your resources :users route to just a few actions with the `only: [:your, :actions, :here]` syntax. Also, what does your devise_for look like? I have found that the order of module inclusion can be important.

Walter


> On Aug 8, 2017, at 5:47 AM, fugee ohu <[hidden email]> wrote:
>
> How do I edit users when i have devise_for :users and resources :users I have a users controller with it's own whitelist and then I can whitelist for devise in application_controller.rb What's the status of the crud users controller and it's whitelist? I've been trying to edit a user but the changes don't take It says user was successfully updated but then when I click edit again nothing's changed
>
>
> --
> 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 an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d8931cf8-d7f8-4523-aaa8-ee3fbf4d44b0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
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 an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/DF079E0E-0E6E-44DF-AA97-292D1BC839AF%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: devise administrating users

fugee ohu


On Tuesday, August 8, 2017 at 8:26:37 AM UTC-4, Walter Lee Davis wrote:
The order of inclusion in the routes file is important here. If you have:

devise_for :users

[followed by]

resources :users

...then the rake routes command will show you that the `user PATCH` path will be handled by the users_controller. If you have those two in the opposite order, then you will see that `users PATCH` (note the plural) will be handled by the devise_controller, and the path will be named users_registration.

What do you see when you rake routes in your application? You may also need to restrict your resources :users route to just a few actions with the `only: [:your, :actions, :here]` syntax. Also, what does your devise_for look like? I have found that the order of module inclusion can be important.

Walter


> On Aug 8, 2017, at 5:47 AM, fugee ohu <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="2OliB4OVCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fuge...@...> wrote:
>
> How do I edit users when i have devise_for :users and resources :users I have a users controller with it's own whitelist and then I can whitelist for devise in application_controller.rb What's the status of the crud users controller and it's whitelist? I've been trying to edit a user but the changes don't take It says user was successfully updated but then when I click edit again nothing's changed
>
>
> --
> 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 an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="2OliB4OVCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="2OliB4OVCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/d8931cf8-d7f8-4523-aaa8-ee3fbf4d44b0%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/d8931cf8-d7f8-4523-aaa8-ee3fbf4d44b0%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/d8931cf8-d7f8-4523-aaa8-ee3fbf4d44b0%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/d8931cf8-d7f8-4523-aaa8-ee3fbf4d44b0%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.


Hey Walter Thanks Actually it was some database columns needed renaming but the info you gave me above is pretty good Thanks

--
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 an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c3e88f51-cd1c-4a03-ab7d-52d9134c597f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...