lib/s3_relay/model.rb in s3_relay-0.3.2 vs lib/s3_relay/model.rb in s3_relay-0.4.0

- old
+ new

@@ -13,12 +13,10 @@ parent_type: self.class.to_s, parent_id: self.id, upload_type: upload_type ) end - - virtual_attribute = "new_#{attribute}_uuids" else has_one attribute, as: :parent, class_name: "S3Relay::Upload" define_method attribute do S3Relay::Upload @@ -27,13 +25,12 @@ parent_id: self.id, upload_type: upload_type ) .order("pending_at DESC").last end - - virtual_attribute = "new_#{attribute}_uuid" end + virtual_attribute = "new_#{attribute}_uuids" attr_accessor virtual_attribute association_method = "associate_#{attribute}" after_save association_method.to_sym