mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Rubocop autocorrect
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Spree
|
||||
module Admin
|
||||
module ImagesHelper
|
||||
@@ -15,4 +17,3 @@ module Spree
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Spree
|
||||
class Asset < ActiveRecord::Base
|
||||
belongs_to :viewable, polymorphic: true, touch: true
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Spree
|
||||
class Image < Asset
|
||||
validates_attachment_presence :attachment
|
||||
@@ -23,7 +25,7 @@ module Spree
|
||||
Spree::Image.attachment_definitions[:attachment][:default_url] = Spree::Config[:attachment_default_url]
|
||||
Spree::Image.attachment_definitions[:attachment][:default_style] = Spree::Config[:attachment_default_style]
|
||||
|
||||
#used by admin products autocomplete
|
||||
# used by admin products autocomplete
|
||||
def mini_url
|
||||
attachment.url(:mini, false)
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Asset do
|
||||
@@ -6,7 +8,7 @@ describe Spree::Asset do
|
||||
product = create(:custom_product)
|
||||
asset = Spree::Asset.create! { |a| a.viewable = product.master }
|
||||
|
||||
product.update_column(:updated_at, 1.day.ago)
|
||||
product.update_column(:updated_at, 1.day.ago)
|
||||
|
||||
expect do
|
||||
asset.touch
|
||||
|
||||
Reference in New Issue
Block a user