Here is a decorator
app/decorators/campaign_decorator.rb
class CampaignDecorator < Draper::Decorator
delegate_all Campaign::Campaign
def created_at
helpers.content_tag :span, class: 'time' do
object.created_at.strftime("%a %m/%d/%y")
end
end
def custom_method
'hello there!'
end
end
When I call CampaignDecorator.custom_method
it doesn't find the method. Also CampaignDecorator.first.created_at
returns unformated date.
Can anyone please tell what am I missing?