trying to create a select box in _form.rhtml.
I have a table called organisations that contains fileds, 2 being ‘id’
these are the fields I need to bring over to the clients _form.rhtml.
whats the best way of going about that??
2 ways i have seen suggested that I cant get to work
-@organisations = Organisation.find_all placed this in def new in
but jsut get an error message when trying to extract the data, not sure
if it would work if there’s no organisations entered either!
@organisations = Organisation.find(:all, :order => “name”)
collection_select(:Organisation, :name, @organisations, :id, :name)
have also tried putting this in the _form.rhtml, but nothing seems to
my models look like this
class Organisation < ActiveRecord::Base
class Client < ActiveRecord::Base