I was reading through the blog post Authentication with Warden, devise-less, but one thing in that post is how he approaches the routing. So which one is more logical: the authors way
resources :users do
collection do
# Registrations is set as plural, which means that each user can make many
# registrations, and open many sessions and so will make many confiramtions
resource :registrations, only: [:show, :create]
resource :sessions, only: [:new, :create, :destroy]
resource :confirmations, only: [:show]
end
end
my way
resources :users do
collection do
# Their is only one registration for each user, so why we use it in plural
resource :registration, only: [:show, :create]
# the same with session and confirmation
resource :session, only: [:new, :create, :destroy]
resource :confirmation, only: [:show]
end
end
I am a little confused about the collection and member features in rails routing, so which one is more logical.