diff options
| author | Zog | 2018-03-30 16:15:48 +0200 |
|---|---|---|
| committer | Zog | 2018-04-09 16:58:23 +0200 |
| commit | bf745bf731237f4d405065de5d386eaee2a2d131 (patch) | |
| tree | 584b5d6748deb095e399117c1f443bd7febed8d1 /app/models/concerns | |
| parent | 745428deb8e0df2c7c8a991ab8a5f5231e6d6c7f (diff) | |
| download | chouette-core-bf745bf731237f4d405065de5d386eaee2a2d131.tar.bz2 | |
Refs #6367; Add metadata to other versioned models
Diffstat (limited to 'app/models/concerns')
| -rw-r--r-- | app/models/concerns/metadata_support.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/metadata_support.rb b/app/models/concerns/metadata_support.rb index a1daf6b2e..0075d9391 100644 --- a/app/models/concerns/metadata_support.rb +++ b/app/models/concerns/metadata_support.rb @@ -41,7 +41,7 @@ module MetadataSupport def method_missing(mid, *args) out = super(mid, *args) - owner.write_attribute attribute_name, @table + owner.send :write_attribute, attribute_name, @table out = out&.to_time if args.length == 0 && is_timestamp_attr?(mid) out end @@ -64,7 +64,7 @@ module MetadataSupport define_singleton_method("#{name}=") do |x| modifiable[timestamp_attr_name] = Time.now if timestamp_attr_name modifiable[name] = x - owner.write_attribute attribute_name, @table + owner.send :write_attribute, attribute_name, @table end modifiable[timestamp_attr_name] = Time.now if timestamp_attr_name end |
