Module: Effective::Resources::Klass
- Included in:
- Effective::Resource
- Defined in:
- app/models/effective/resources/klass.rb
Instance Method Summary collapse
- #active_model? ⇒ Boolean
- #active_record? ⇒ Boolean
- #controller_klass ⇒ Object
- #datatable_klass ⇒ Object
- #klass ⇒ Object
Instance Method Details
#active_model? ⇒ Boolean
23 24 25 |
# File 'app/models/effective/resources/klass.rb', line 23 def active_model? klass && klass.ancestors.include?(ActiveModel::Model) end |
#active_record? ⇒ Boolean
19 20 21 |
# File 'app/models/effective/resources/klass.rb', line 19 def active_record? klass && klass.ancestors.include?(ActiveRecord::Base) end |
#controller_klass ⇒ Object
15 16 17 |
# File 'app/models/effective/resources/klass.rb', line 15 def controller_klass find_controller_klass end |
#datatable_klass ⇒ Object
11 12 13 |
# File 'app/models/effective/resources/klass.rb', line 11 def datatable_klass (find_tenant_datatable_klass || find_datatable_klass) if defined?(EffectiveDatatables) end |
#klass ⇒ Object
7 8 9 |
# File 'app/models/effective/resources/klass.rb', line 7 def klass @model_klass end |