Module: QueueClassicAdmin::ApplicationHelper
- Defined in:
- app/helpers/queue_classic_admin/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#has_qc_later? ⇒ Boolean
3 4 5 6 7 |
# File 'app/helpers/queue_classic_admin/application_helper.rb', line 3 def has_qc_later? QC.respond_to?(:enqueue_in) && defined?(QC::Later) && ActiveRecord::Base.connection.table_exists?(QC::Later::TABLE_NAME) end |
#sortable_column(name, title) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/queue_classic_admin/application_helper.rb', line 9 def sortable_column(name, title) opts = {sort: name} opts[:dir] = (params[:dir] == "asc" ? "desc" : "asc") content_tag :th do s = link_to title, params.merge(opts) if params[:sort] == name.to_s icon = if params[:dir] == 'asc' "↑" else "↓" end s += raw(icon) end s.html_safe end end |