I've been trying for hours to get my rails form to work but I can't. The error that it keeps throwing says:
ArgumentError at / wrong number of arguments (3 for 1..2)
and the line of code where it says this error occurs is at the f.input line. Any ideas?
.select-width
= f.label :country
= f.input :country, :select, :as => :fancy_select, collection: ['South Africa', 'Nigeria', 'Zimbabwe', 'Mali', 'Namibia'], hint: 'Lorem ipsum hint'
In simple_form
, input
requires only two parameters.
So, you can use following code. It will work fine.
.select-width
= f.label :country
= f.input :country, as: :fancy_select, collection: ['South Africa', 'Nigeria', 'Zimbabwe', 'Mali', 'Namibia'], hint: 'Lorem ipsum hint'