Module: Effective::EffectiveDatatable::Resource

Included in:
Datatable
Defined in:
app/models/effective/effective_datatable/resource.rb

Constant Summary collapse

AGGREGATE_SQL_FUNCTIONS =
['ARRAY_AGG(', 'AVG(', 'COUNT(', 'MAX(', 'MIN(', 'STRING_AGG(', 'SUM(']

Instance Method Summary collapse

Instance Method Details

#admin_namespace?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/effective/effective_datatable/resource.rb', line 6

def admin_namespace?
  [:admin, 'admin'].include?(controller_namespace)
end

#association_macrosObject



14
15
16
# File 'app/models/effective/effective_datatable/resource.rb', line 14

def association_macros
  [:belongs_to, :belongs_to_polymorphic, :has_many, :has_and_belongs_to_many, :has_one]
end

#controller_namespaceObject



10
11
12
# File 'app/models/effective/effective_datatable/resource.rb', line 10

def controller_namespace
  @attributes[:namespace]
end