Hi
ROR newby question:
I've got a controller with the following action:
# GET /organisations/new
# GET /organisations/new.xml
def new
@organisation = Organisation.new
@organisationtypes = Organisationtype.find(:all)
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @organisation }
end
end
and a select within the organisations/new view for organisationtype like so:
<p>
<%= f.label :organisationtype %><br />
<%= select "organisation", "organisationtype_id", Organisationtype.find(:all).collect {|p| [ p.organisationtype, p.id ] }, {:include_blank => true } %>
</p>
I'm struggling to order the select by organisationtype. How would I do this?
Thanks for your time
Sniffer