class ProMotion::DataTableScreen

Public Class Methods

data_model() click to toggle source
# File lib/project/pro_motion/data_table_screen.rb, line 19
def data_model
  @opts[:model]
end
data_scope() click to toggle source
# File lib/project/pro_motion/data_table_screen.rb, line 23
def data_scope
  @opts[:scope]
end
model(value, opts = {}) click to toggle source
# File lib/project/pro_motion/data_table_screen.rb, line 8
def model(value, opts = {})
  if value.method_defined?(:cell)
    @opts = {
      model: value,
      scope: :all,
    }.merge(opts)
  else
    raise "#{value} must define the cell method"
  end
end