lib/dynamic_image/helper.rb in dynamic_image-2.0.2 vs lib/dynamic_image/helper.rb in dynamic_image-2.0.3

- old
+ new

@@ -113,11 +113,11 @@ def default_format_for_image(record) Mime::Type.lookup(record.safe_content_type).to_sym end def dynamic_image_digest(record, action, size = nil) - key = [action || 'show', record.id, size].compact.join('-') + key = [action || "show", record.id, size].compact.join("-") DynamicImage.digest_verifier.generate(key) end def dynamic_image_path_with_size(record_or_array, size = nil, options = {}) dynamic_image_url_with_size(record_or_array, @@ -150,12 +150,12 @@ def fit_size!(record_or_array, options) record = extract_dynamic_image_record(record_or_array) action = options[:action].try(:to_s) size_opts = options.extract!(:size, :crop, :upscale) if size_opts[:size] - image_sizing(record, size_opts, (action == 'uncropped')) + image_sizing(record, size_opts, (action == "uncropped")) else - (action == 'original' ? record.real_size : record.size).floor.to_s + (action == "original" ? record.real_size : record.size).floor.to_s end end def image_sizing(record, size_opts, uncropped) ImageSizing