Source: show | on GitHub
# File activestorage/app/models/active_storage/variant_with_record.rb, line 6 def initialize(blob, variation) @blob, @variation = blob, ActiveStorage::Variation.wrap(variation) end
# File activestorage/app/models/active_storage/variant_with_record.rb, line 23 def image record&.image end
# 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
# File activestorage/app/models/active_storage/variant_with_record.rb, line 10 def processed process self end
# File activestorage/app/models/active_storage/variant_with_record.rb, line 19 def processed? record.present? end