Class: LogDatatable
- Inherits:
-
AjaxDatatablesRails::ActiveRecord
- Object
- AjaxDatatablesRails::ActiveRecord
- LogDatatable
- Extended by:
- Forwardable
- Defined in:
- app/datatables/log_datatable.rb
Instance Attribute Summary collapse
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
-
#initialize(params, opts = {}) ⇒ LogDatatable
constructor
A new instance of LogDatatable.
- #view_columns ⇒ Object
Constructor Details
#initialize(params, opts = {}) ⇒ LogDatatable
Returns a new instance of LogDatatable.
5 6 7 8 |
# File 'app/datatables/log_datatable.rb', line 5 def initialize(params, opts = {}) @view = opts[:view_context] super end |
Instance Attribute Details
#view ⇒ Object (readonly)
Returns the value of attribute view.
3 4 5 |
# File 'app/datatables/log_datatable.rb', line 3 def view @view end |
Instance Method Details
#view_columns ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/datatables/log_datatable.rb', line 12 def view_columns # Declare strings in this format: ModelName.column_name # or in aliased_join_table.column_name format @view_columns ||= { severity: { source: 'Log.severity', searchable: false }, date: { source: 'Log.created_at', searchable: false }, message: { source: 'Log.message' }, category: { source: 'Log.category', searchable: false } } end |