Answer the question
In order to leave comments, you need to log in
How to properly organize the structure of layouts, pages and actions for this view?
Oddly enough, I found what I was looking for on Habré, so I want to understand how to do this correctly :
What we have
Two addresses:
https://habrahabr.ru/users/f15/favorites/
https://habrahabr.ru/users/f15/ favorites/comments/
I.e. in routes I describe it like this:
resources :users do
member do
get 'favorites' => 'users#favorites'
get 'favorites/comments' => 'users#favorites_comments'
end
end
Answer the question
In order to leave comments, you need to log in
You can do as you described: one template with different parsleys depending on the selected tab. If can be got rid of just by proper naming.
In action games:
In the template:
If the code is simple, you can not use locals, but immediately apply the action_name in the template to select the parsley.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question