I have form, and date_select there
here is my form (in edit view)
=form_for @user do |f|
%p
= f.date_select('user','birthday',:start_year => 1940)
here is my edit action
def edit
@user = User.find(params[:id])
end
in my case it writes an error
undefined method `merge’ for “birthday”:String
i have attribute birthday:date, also i tryed on string attribute but it didnt work. So how to use date select in my case?(also how to validate it? and how to set default values?)
Thanks in advance
You don’t need to add the argument for the user, it is already contained in the
fvariable.