Class: ReportTemplate

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/report_template.rb

Instance Method Summary collapse

Instance Method Details

#serialization_paramsObject



14
15
16
17
18
19
20
21
# File 'app/models/report_template.rb', line 14

def serialization_params
  value = read_attribute :serialization_params
  begin
    value.nil? ? {} : Marshal.load(value)
  rescue TypeError

  end
end

#serialization_params=(value) ⇒ Object



7
8
9
10
11
12
# File 'app/models/report_template.rb', line 7

def serialization_params=(value)
  if value.is_a? Hash
    value = Marshal.dump(value)
  end
  write_attribute :serialization_params, value
end