Paul Corcoran wrote:
Try changing this:
collection_select("ticket", "priority_id", @ticket_priority, "id", "priority", {:prompt => "Select priority..."}
to this:
collection_select(@ticket, :priority_id, @ticket_priority, :id, :priority, {:prompt => "Select priority..."}
-Paul
-- Posted via http://www.ruby-forum.com/.
Hmm...now it won't even render the form.
NameError in Ticket#new
Showing app/views/ticket/_form.rhtml where line #11 raised:
`@#<Ticket:0xb75ee748>' is not allowed as an instance variable name
Extracted source (around line #11):
8: <%= text_area 'ticket', 'details', {:style => "width: 325px"} %></p> 9: 10: <p><label for="ticket[status_id]">Status</label><br/> 11: <%= collection_select(@ticket, :status_id, @ticket_status, :id, :status, {:prompt => "Select status..."}, {:style => "width: 150px"}) %></p> 12: 13: <p><label for="ticket[priority_id]">Priority</label><br/> 14: <%= collection_select(@ticket, :priority_id, @ticket_priority, :id, :priority, {:prompt => "Select priority..."}, {:style => "width: 150px"}) %></p>