how to send parameter to the action of another controller through url in rails?
controller1:
def show
@controller1.id = params[:controller1_id]
end
in the view of controller1:
%a.btn-general{:href => "/controller2/new/#{parameteroffirst.id}", :controller1_id @controller1.id, :role => "button"} Add the first
how to send controller1.id to new action of controller2?
Aucun commentaire:
Enregistrer un commentaire