I want to know if there is a way to output a string only if the value isn't nil but to it without repeating the item.
In other words I want to do the following:
<%= MyClass.thing.stuff.more_stuff if !MyClass.thing.stuff.more_stuff.blank? %>
But without having to repeat the whole thing twice. Not even sure if it's possible but I couldn't figure out the right terms to Google.
MyClass.thing.stuff.more_stuffis nil so that<%= MyClass.thing.stuff.more_stuff %>will returns nil too. And as result it won't print any output in your view.