Sha256: 515bb11c81127f133646a82d95e007ccc9585fc0b0d4ecbe0ee8c7dc5059d3ca
Contents?: true
Size: 373 Bytes
Versions: 1
Compression:
Stored size: 373 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
draper-1.0.0.beta1 | spec/dummy/app/decorators/post_decorator.rb |