summaryrefslogtreecommitdiff
path: root/lib/hashie/extensions/dash/property_translation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hashie/extensions/dash/property_translation.rb')
-rw-r--r--lib/hashie/extensions/dash/property_translation.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/hashie/extensions/dash/property_translation.rb b/lib/hashie/extensions/dash/property_translation.rb
index 8149faa..69a2d71 100644
--- a/lib/hashie/extensions/dash/property_translation.rb
+++ b/lib/hashie/extensions/dash/property_translation.rb
@@ -153,7 +153,12 @@ module Hashie
def []=(property, value)
if self.class.translation_exists? property
send("#{property}=", value)
- super(property, value) if self.class.properties.include?(property)
+
+ if self.class.transformation_exists? property
+ super property, self.class.transformed_property(property, value)
+ elsif self.class.properties.include?(property)
+ super(property, value)
+ end
elsif self.class.transformation_exists? property
super property, self.class.transformed_property(property, value)
elsif property_exists? property