Module: Datagrid::ActiveModel::InstanceMethods

Defined in:
lib/datagrid/active_model.rb

Overview

ClassMethods

Instance Method Summary collapse

Instance Method Details

#param_keyObject



37
38
39
# File 'lib/datagrid/active_model.rb', line 37

def param_key
  param_name
end

#param_nameObject



33
34
35
# File 'lib/datagrid/active_model.rb', line 33

def param_name
  self.class.param_name
end

#persisted?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/datagrid/active_model.rb', line 45

def persisted?
  false
end

#to_keyObject



41
42
43
# File 'lib/datagrid/active_model.rb', line 41

def to_key
  [self.class.param_name]
end

#to_modelObject



49
50
51
# File 'lib/datagrid/active_model.rb', line 49

def to_model
  self
end

#to_paramObject



53
54
55
# File 'lib/datagrid/active_model.rb', line 53

def to_param
  self.param_name
end