speakerinnen_liste
speakerinnen_liste copied to clipboard
profiles controller for admin
There are two actions: update and admin_update in admin/profiles_controller.rb doing similar things, so check to use one action instead.
See: https://github.com/rubymonsters/speakerinnen_liste/blob/master/app/controllers/admin/profiles_controller.rb
This is my first time looking at Speakerinnen code (yay!), so I could use some input:
I've searched in the code, it seems the admin profiles controller (controllers/admin/profiles_controller.rb
)'s regular update
action is not being used, only the admin_update
action. But I might have overlooked something. Has anyone recently looked at this?
Seems unnecessary to have an extra admin_update
action, as we are already in a controller in the admin scope.
So I could put the code inside admin_update
, which does a bit more, into update
and then change all the paths to point to it as well.
Thoughts? :)
YAY 🎉 Welcome @ariaru \o/ It's a long time ago I worked on this, but it seems to me you are right. I would prefer to use the update action instead of admin_update because it's the rails default (then we don't need an extra route; it's also clear that we use the admin controller, so it's repeated unnecessarily). Maybe it's a good way to look at the tests here https://github.com/rubymonsters/speakerinnen_liste/blob/master/spec/controllers/admin/profiles_controller_spec.rb and check what that covers (I guess not all functionality is tested), write a test for the wanted behavior so you can verify the code works properly. Feel free to ask again! :)