how do i pass a polymorphic object to another controller?
for example redirecting from messages/1/
to requests/new?object_type=message&object_id=1
or, second example, from files/154/
to requests/new?object_type=file&object_id=154
is
redirect_to new_request_path(:object_type => params[:controller].classify, :object_id => params[:id])
right?
Request model has
belongs_to :object , :polymorphic => true