Class: Madmin::StaticModels::Adapter
- Inherits:
-
Object
- Object
- Madmin::StaticModels::Adapter
- Defined in:
- lib/madmin/static_models/adapter.rb
Overview
Base class for static model backends. An adapter declares which model classes it manages and how to introspect them. Register one with:
Madmin::StaticModels.register(MyAdapter)
Direct Known Subclasses
Class Method Summary collapse
-
.column_names(model) ⇒ Object
Ordered attribute names (strings) for the model, primary key first.
-
.handles?(model) ⇒ Boolean
True if this adapter manages the given model class.
-
.models ⇒ Object
All model classes managed by this adapter that are currently loaded.
Class Method Details
.column_names(model) ⇒ Object
Ordered attribute names (strings) for the model, primary key first.
14 15 16 |
# File 'lib/madmin/static_models/adapter.rb', line 14 def self.column_names(model) [] end |
.handles?(model) ⇒ Boolean
True if this adapter manages the given model class.
9 10 11 |
# File 'lib/madmin/static_models/adapter.rb', line 9 def self.handles?(model) false end |
.models ⇒ Object
All model classes managed by this adapter that are currently loaded. Used by the install generator to create resources.
20 21 22 |
# File 'lib/madmin/static_models/adapter.rb', line 20 def self.models [] end |