Question: why do you pass your session variables to a link? You can get them directly from the session ...
, - : user_post_id : poster_id , :
1) URL-, ( , )
2) URL/.
( , , ):
:
map.resources :users do |user|
user.resources :posts do |post|
post.resource :vote
end
end
, URL:
/users/:id/posts/:post_id/vote
:
link_to "Up", user_post_vote_path(@user, @post), :method => :create
@user @post , ,
link_to "Up", [@user, @post, :vote]
:
class VoteController ....
def create
end
end
, RESTful.
, .