Module: RedisWebManager::ApplicationHelper
- Includes:
- Pagy::Frontend
- Defined in:
- app/helpers/redis_web_manager/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#expiry(value) ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/helpers/redis_web_manager/application_helper.rb', line 21 def expiry(value) if value == -1 'No expiration date' else distance_of_time_in_words(value) end end |
#status(value) ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/helpers/redis_web_manager/application_helper.rb', line 9 def status(value) if value content_tag(:kbd, 'ON', class: 'bg-success bounce') else content_tag(:kbd, 'OFF', class: 'bg-danger bounce') end end |
#url(value) ⇒ Object
17 18 19 |
# File 'app/helpers/redis_web_manager/application_helper.rb', line 17 def url(value) content_tag(:kbd, value, class: 'bg-dark') end |