Sha256: 6fcc4d1328f29b7d55f637573dc93377ceb3c75a6cd4713b7619b7e231de9268

Contents?: true

Size: 680 Bytes

Versions: 22

Compression:

Stored size: 680 Bytes

Contents

class MessageDatatable < AjaxDatatablesRails::Base
  def_delegators :@view, :link_to, :manage_message_path

  def view_columns
    @view_columns ||= {
      id: { source: "Message.id" },
      name: { source: "Message.name" },
      subject: { source: "Message.subject" }
    }
  end

  private

  def data
    records.map do |record|
      {
        link: link_to('<i class="fa fa-search"></i>'.html_safe, manage_message_path(record)),
        id: record.id,
        name: record.name,
        subject: record.subject,
        status: record.status.titleize
      }
    end
  end

  # rubocop:disable Style/AccessorMethodName
  def get_raw_records
    Message.unscoped
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hackathon_manager-0.5.10 app/datatables/message_datatable.rb
hackathon_manager-0.5.9 app/datatables/message_datatable.rb
hackathon_manager-0.5.8 app/datatables/message_datatable.rb
hackathon_manager-0.5.7 app/datatables/message_datatable.rb
hackathon_manager-0.5.6 app/datatables/message_datatable.rb
hackathon_manager-0.5.5 app/datatables/message_datatable.rb
hackathon_manager-0.5.4 app/datatables/message_datatable.rb
hackathon_manager-0.5.3 app/datatables/message_datatable.rb
hackathon_manager-0.5.2 app/datatables/message_datatable.rb
hackathon_manager-0.5.1 app/datatables/message_datatable.rb
hackathon_manager-0.5.0 app/datatables/message_datatable.rb
hackathon_manager-0.4.4 app/datatables/message_datatable.rb
hackathon_manager-0.4.3 app/datatables/message_datatable.rb
hackathon_manager-0.4.2 app/datatables/message_datatable.rb
hackathon_manager-0.4.1 app/datatables/message_datatable.rb
hackathon_manager-0.4.0 app/datatables/message_datatable.rb
hackathon_manager-0.3.3 app/datatables/message_datatable.rb
hackathon_manager-0.3.2 app/datatables/message_datatable.rb
hackathon_manager-0.3.1 app/datatables/message_datatable.rb
hackathon_manager-0.3.0 app/datatables/message_datatable.rb