Module: Datagrid::ActiveModel
- Defined in:
- lib/datagrid/active_model.rb
Overview
Required to be ActiveModel compatible
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#param_key ⇒ String
URL query parameter name of the grid class.
-
#param_name ⇒ String
URL query parameter name of the grid class.
- #persisted? ⇒ Boolean
- #to_key ⇒ Object
- #to_model ⇒ Object
- #to_param ⇒ Object
Instance Method Details
#param_key ⇒ String
Returns URL query parameter name of the grid class.
34 35 36 |
# File 'lib/datagrid/active_model.rb', line 34 def param_key param_name end |
#param_name ⇒ String
Returns URL query parameter name of the grid class.
29 30 31 |
# File 'lib/datagrid/active_model.rb', line 29 def param_name self.class.param_name end |
#persisted? ⇒ Boolean
42 43 44 |
# File 'lib/datagrid/active_model.rb', line 42 def persisted? false end |
#to_key ⇒ Object
38 39 40 |
# File 'lib/datagrid/active_model.rb', line 38 def to_key [self.class.param_name] end |
#to_model ⇒ Object
46 47 48 |
# File 'lib/datagrid/active_model.rb', line 46 def to_model self end |
#to_param ⇒ Object
50 51 52 |
# File 'lib/datagrid/active_model.rb', line 50 def to_param self.param_name end |