<%= collection_select(:country, :id, @country_list, :id, :country_name,
options ={:prompt => "-- Select a country --"}, :class =>"country") %>
How can I ensure that this the is validated correctly?
I have tried validates_prescence_of, but does not seem to work when I
select an actual country - it says:
Country can't be blank
Any idea what this could mean or how should I do this?
It means that you have said validates_presence_of country and it is
blank, so is not present, so the validation fails. Look in
development.log to see what values are being passed to the controller.
If necessary use ruby-debug to break in to the controller at the save
to see what you have put into the record being saved. See the Rails
Guide on debugging if you do not know how to do this.