I have a form
which is shared among some controllers. Sometimes I pass in isbn
argument, sometimes not.
= form_for book do |f|
- if isbn.present?
= f.hidden_field :virtual_isbn_id, :value => isbn.id
How do I check if isbn is populated or not? Alternatively, how can I set isbn to be nil by default?
Thank you.