I need some methods to return true/false if a attribute had a value. So we have a date attribute
#invited_on and I want an
#invited? method to return true if the date is present.
There are a few dates for which I need this. My first attempt:
%w(invited_on selected_on confirmed_on ready).each do |attr| define_method attr.gsub('_on', '') + '?' do send(attr).present? end end