Oh my god, this really shouldn't be a tough one, but I just don't get
class Page < ActiveRecord::Base
caption ? caption : title
I want to return the content of the title column when the caption column
p.caption # Caption is not empty
# => "caption"
p.caption # Caption is empty
# => "title"
Not astonishing, I get a StackLevelTooDeep Exception with my "solution"
above... But how can I do it right?
Thanks a lot... My brain is just a bit wrecked today...