Sha256: be3fb11ac3f5f1cc216f64a09e1419f022ef6ce10d8b2b63b00d2c6690181e76
Contents?: true
Size: 419 Bytes
Versions: 5
Compression:
Stored size: 419 Bytes
Contents
class PostDecorator < Draper::Decorator def posted_date if created_at.to_date == DateTime.now.utc.to_date "Today" else "Not Today" end end def path_with_model h.post_path(source) end def path_with_id h.post_path(id: id) end def url_with_model h.post_url(source) end def url_with_id h.post_url(id: id) end def link h.link_to id.to_s, self end end
Version data entries
5 entries across 5 versions & 1 rubygems