Methods
Attributes
[R] | blob | |
[R] | variation |
Class Public methods
new(blob, variation)
📝 Source code
# File activestorage/app/models/active_storage/variant_with_record.rb, line 6
def initialize(blob, variation)
@blob, @variation = blob, ActiveStorage::Variation.wrap(variation)
end
🔎 See on GitHub
Instance Public methods
image()
📝 Source code
# File activestorage/app/models/active_storage/variant_with_record.rb, line 23
def image
record&.image
end
🔎 See on GitHub
process()
📝 Source code
# File activestorage/app/models/active_storage/variant_with_record.rb, line 15
def process
transform_blob { |image| create_or_find_record(image: image) } unless processed?
end
🔎 See on GitHub
processed()
📝 Source code
# File activestorage/app/models/active_storage/variant_with_record.rb, line 10
def processed
process
self
end
🔎 See on GitHub
processed?()
📝 Source code
# File activestorage/app/models/active_storage/variant_with_record.rb, line 19
def processed?
record.present?
end
🔎 See on GitHub