@gravitystorm commented on this pull request.
> @@ -280,8 +280,8 @@
resource :profile, :only => [:edit, :update]
# friendships
- match "/user/:display_name/make_friend" => "friendships#make_friend", :via
=> [:get, :post], :as => "make_friend"
- match "/user/:display_name/remove_friend" => "friendships#remove_friend",
:via => [:get, :post], :as => "remove_friend"
+ match "/user/:display_name/follow_user" => "friendships#follow_user", :via
=> [:get, :post], :as => "follow_user"
+ match "/user/:display_name/unfollow_user" => "friendships#unfollow_user",
:via => [:get, :post], :as => "unfollow_user"
>From a quick look at some gems that implement this functionality
>([1](https://github.com/cmer/socialization),
>[2](https://github.com/tcocca/acts_as_follower)) the convention is to use
>"follow" as a noun, so table is `follows`, controller is `follows_controller`,
>model is `Follow` etc. But I think we should rename the controllers/models
>separately.
What it does suggest though is that we should use resourceful routing with this
in mind, so for example "/user/:display_name/follow" with create/destroy
actions (and new/edit for the GET pages). See `user_mutes` for an example in
the routes.rb file that's a bit like this.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5261#discussion_r1803308006
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5261/review/2372806...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev