module ApplicationHelper def standard_date(d) d.strftime("%m/%d/%Y") end def standard_datetime(d) d.strftime("%m/%d/%Y %H:%m") end def standard_time(d) d.strftime("%I:%m %p") end def is_active(is_active) if is_active == true or is_active == 'published' image_tag('icon-yes.gif', :width => 10, :height => 10) else image_tag('icon-no.gif', :width => 10, :height => 10) end end end