Class: PortableValue

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/portable-value.rb

Instance Method Summary collapse

Instance Method Details

#set_groupObject



7
8
9
10
11
12
13
14
# File 'lib/portable-value.rb', line 7

def set_group
  config = eval(self.model_type).eav_configuration
  if config[self.context].present?
    if config[self.context][:group].present?
      self.group = model.send(config[self.context][:group])
    end
  end
end