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