On 4 August 2010 14:15, disruptive tech <[email protected]> wrote:
> Colin Law wrote:
>> On 4 August 2010 11:10, Colin Law <[email protected]> wrote:
>>>>> the id and country name for each item in @country list?  Doing that
>>>> UK  Show  Edit  Destroy
>>>> France  Show  Edit  Destroy
>>>> Germany  Show  Edit  Destroy
>>>
>>> Is that from code inserted in the view at the same point as the
>>> collection_select?
>>
>> You replied showing the trace (but not actually as a reply to this
>> post) but did not answer the above question
>>
>> Colin
>
> Problem solved, I had not put the @country_list into the other methods -
> such as the index one. This now worked and I can create a drop down
> populated from the table.

Hmm, so the error in new.html.erb was due to the fact that you had not
populated @country_list in the controller#index.  I think not.

>
> Now I am presuming the select statement will pop the id into the country
> field in my created users table. However I cannot seem to find it in the
> actual data tables.

No idea what you are talking about.  All a select does is to allow a selection.

>
> Plus also how best to validate drop down boxes?

Validation is nothing to do with how the data are selected.  It is
purely a verification of the data as it goes into the db via the
model.

Colin

>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to