How do I suppress the nil errors in ActionView Erb templates?
For instance if I have a record in the database table that allows null
fields and then I show the record, in this case an association using
belongs_to, how do I suppress the Nil errors on those fields that are
null?
I’ve already used all the different ways described in previous messages, but there has to be a way of setting a global replacement string. My views are just littered with code like that and it doesn’t look nice. A helper might probably help, but even that adds code to every value in the view.