Class: Search::CouponPresenter
- Inherits:
-
BasePresenter
- Object
- SimpleDelegator
- BasePresenter
- Search::CouponPresenter
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/coupon_presenter.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BasePresenter
#current_account, #options, #url_helper
Instance Method Summary collapse
Methods inherited from BasePresenter
#can?, #capture, #concat, #content_tag, #fa_icon, #h, #initialize, #link_to, #number_to_currency, #present, presents, #r, #safe_present, #simple_format, #u
Constructor Details
This class inherits a constructor from BasePresenter
Instance Method Details
#coupon_link ⇒ Object
10 11 12 |
# File 'app/presenters/search/coupon_presenter.rb', line 10 def coupon_link h.link_to r.code, h.coupon_path(r.id), class: 'btn btn-outline-primary btn-block' end |
#status ⇒ Object
6 7 8 |
# File 'app/presenters/search/coupon_presenter.rb', line 6 def status r.status.humanize.titleize end |