Class: Cortex::FieldItem

Inherits:
ApplicationRecord show all
Defined in:
app/models/cortex/field_item.rb

Instance Method Summary collapse

Instance Method Details

#data=(data_hash) ⇒ Object



9
10
11
12
13
# File 'app/models/cortex/field_item.rb', line 9

def data=(data_hash)
  # Reset @field_type_instance so that massaged data can be re-generated every time @data is set, not just on init
  @field_type_instance = nil
  super(field_type_instance(data_hash).data || data_hash)
end

#tenantObject



15
16
17
# File 'app/models/cortex/field_item.rb', line 15

def tenant
  content_item.tenant
end