lib/embedson/model/method_builder.rb in embedson-1.0.3 vs lib/embedson/model/method_builder.rb in embedson-1.0.4
- old
+ new
@@ -19,9 +19,13 @@
def embedded
EmbeddedBuilder.new(self).define
generate_common
end
+ def hash_method
+ @hash_method || options.fetch(:hash_method, nil) || :to_h
+ end
+
def column_name
@column_name ||= options.fetch(:column_name, nil) || field_name
end
def related_klass_name