Module: Datagrid::ActiveModel::InstanceMethods

Defined in:
lib/datagrid/active_model.rb

Overview

ClassMethods

Instance Method Summary collapse

Instance Method Details

#param_keyObject



35
36
37
# File 'lib/datagrid/active_model.rb', line 35

def param_key
  param_name
end

#param_nameObject



31
32
33
# File 'lib/datagrid/active_model.rb', line 31

def param_name
  self.class.param_name
end

#persisted?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/datagrid/active_model.rb', line 43

def persisted?
  false
end

#to_keyObject



39
40
41
# File 'lib/datagrid/active_model.rb', line 39

def to_key
  [self.class.param_name]
end

#to_modelObject



47
48
49
# File 'lib/datagrid/active_model.rb', line 47

def to_model
  self
end

#to_paramObject



51
52
53
# File 'lib/datagrid/active_model.rb', line 51

def to_param
  self.param_name
end