Notes posted by RafaelPereaRSS feed
No problem with new records however,
the following line will not display the current @ecard value on EDIT but ‘email@example.com’.
text_field :ecard, :sender, :value => 'firstname.lastname@example.org'
Don’t let your views take control, but if you insist:
text_field :ecard, :sender, :value => f.object.ecard.blank? ? 'email@example.com' : f.object.ecard
This doesn’t make sense, since when this object was created they deleted the default, which made it blank. Why would they want it back?