Ruby on rails 如何将GET参数传递给simpleform输入

Ruby on rails 如何将GET参数传递给simpleform输入,ruby-on-rails,simple-form,Ruby On Rails,Simple Form,我有以下链接到,希望在它指向的页面上的表单中使用它的参数。不知道怎么做 以下是模板上的链接: <%= link_to 'Create Account', shop_account_signup_from_checkout_path(:order_id => @order.id) %> @order.id)%> 链接重定向到另一个模板,该模板位于: <%= simple_form_for @web_user, shop_account_signup_from_check

我有以下链接到,希望在它指向的页面上的表单中使用它的参数。不知道怎么做

以下是模板上的链接:

<%= link_to 'Create Account', shop_account_signup_from_checkout_path(:order_id => @order.id) %>
@order.id)%>
链接重定向到另一个模板,该模板位于:

<%= simple_form_for @web_user, shop_account_signup_from_checkout_path, id: 'signupForm' do |f| %>

  <%= f.input #I want the :order_id from the get request to be passed in here# %>

<% end %>

如何传入
:order\u id
的值


干杯

您的视图可以访问传递到它们从中呈现的动作中的
参数
散列,因此您在这里展示的最简单的方法就是将
simple\u form\u中对
的方法调用更改为:

simple_form_for @web_user, shop_account_signup_from_checkout_path(:order_id => params[:order_id]) #, ...etc.

你在哪里调用模板?给我们看整页