我把它放在我的gemfile中
gem 'country_select'
我运行捆绑安装
我把它放在表格里
= f.country_select(:country, priority_countries: ["US"])
然后,当我重新启动服务器并加载页面时,出现以下错误:
ActionView::Template::Error (wrong number of arguments (given 1, expected 0)):
Rails 5.2
这是整个表格:
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
.row
.col.s12
= devise_error_messages!
.row
.input-field.col.s12
= f.text_field :city
= f.label :city
.row
.input-field.col.s12
= f.label :country
%br
= f.country_select(:country, priority_countries: ["US"])
这是错误:
ActionView::Template::Error (wrong number of arguments (given 1, expected 0)):
20: .input-field.col.s12
21: = f.label :country
22: %br
23: = f.country_select(:country, priority_countries: ["US"])