Nested routes and proper place for a function?
I would not create custom controller actions. up and down are attributes of a Vote, so I would do the following:

resources :widgets do
  resources :votes, only: [:new, :create]
end


And then send a POST to VotesController#create with params[direction: 'up'] and have an attribute on Vote called direction.

Then validate Vote#direction can only be up or down:

class Vote &lt; ActionController:Base
  validates_inclusion_of :direction, in: %w(up down)
end 


Your check for this kind of routing decision is to run rake routes and make sure the route aliases make sense, in this case we are really creating widget_votes, which looks like:

         Prefix Verb   URI Pattern                             Controller#Action
   widget_votes POST   /widgets/:widget_id/votes(.:format)     votes#create
new_widget_vote GET    /widgets/:widget_id/votes/new(.:format) votes#new