Sha256: 42ca5f9b10036ef182bcad16187bcfd0244af73c78e8e1f45ef55580058b42df

Contents?: true

Size: 541 Bytes

Versions: 2

Compression:

Stored size: 541 Bytes

Contents

module UploadDocumentToolHelper
  def sortable(column, title = nil)
    title ||= column.titleize
    css_class = column == sort_column ? "current #{sort_direction}" : nil
    direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
    link_to title, { sort: column, direction: direction }, class: css_class
  end

  def documents_table(documents)
    render 'upload_document_tool/documents', documents: documents
  end

  def document_form(document)
    render 'upload_document_tool/form', document: document
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
upload_documents_tool-0.1.1 app/helpers/upload_document_tool_helper.rb
upload_documents_tool-0.1.0 app/helpers/upload_document_tool_helper.rb