I'm getting some deprecation warnings from some of my forms and I was
wondering how exactly I would convert them to the new format so it's not
deprecated. I tried to do what it suggested but it's not quite that
easy...I appreciate any help. Thanks!
[SNIP]
My select box on my form:
<p><label for="ticket[priority_id]">Priority</label><br/>
<%= select('ticket','priority_id',Priority.find_all.collect {|p| [
p.priority, p.id ] }, { :prompt => "- Select -" }, { :style => "width:
150px" }) %></p>
Haw haw. That's a joke, guys. Theron knows that your code should be so well-factored that all your find_all's only appear in very few places, easy to manually upgrade, and that each one will be too unique to submit do a 'sed' attack...
Much easier to read, understand, and upgrade. Just because Ruby permits these ultra-crunched super-long lines that doesn't mean we should endure them. Or put them in the Rails books...