lib/attached/attachment.rb in attached-0.3.3 vs lib/attached/attachment.rb in attached-0.3.4
- old
+ new
@@ -104,9 +104,16 @@
def changed?
instance.changed.include? "#{name}_identifier"
end
+
+ # Check if an attachment is present.
+ #
+ # Usage:
+ #
+ # @object.avatar.file?
+
def file?
not identifier.blank?
end
\ No newline at end of file