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
8 9 10 |
# File 'app/models/effective/effective_datatable/resource.rb', line 8 def admin_namespace? [:admin, 'admin'].include?(controller_namespace) end |
#association_macros ⇒ Object
16 17 18 |
# File 'app/models/effective/effective_datatable/resource.rb', line 16 def association_macros [:belongs_to, :belongs_to_polymorphic, :has_many, :has_and_belongs_to_many, :has_one] end |
#controller_namespace ⇒ Object
12 13 14 |
# File 'app/models/effective/effective_datatable/resource.rb', line 12 def controller_namespace @attributes[:namespace] end |