If statement with form field select in rails
- by Elliot
I'm trying put an if statement directly into a select field in rails, with no success.
Here is what I've tried:
<%= f.select (:book_id,{
if @a!=1
"Harry Potter", 1,
end
if @b!=2
"Lord of the Rings", 2,
end
end %>`
Any ideas?