lib/paperclip/helpers.rb in kt-paperclip-5.4.0 vs lib/paperclip/helpers.rb in kt-paperclip-6.2.0

- old
+ new

@@ -2,11 +2,11 @@ module Helpers def configure yield(self) if block_given? end - def interpolates key, &block + def interpolates(key, &block) Paperclip::Interpolations[key] = block end # The run method takes the name of a binary to run, the arguments # to that binary, the values to interpolate and some local options. @@ -28,11 +28,11 @@ def run(cmd, arguments = "", interpolation_values = {}, local_options = {}) command_path = options[:command_path] terrapin_path_array = Terrapin::CommandLine.path.try(:split, Terrapin::OS.path_separator) Terrapin::CommandLine.path = [terrapin_path_array, command_path].flatten.compact.uniq if logging? && (options[:log_command] || local_options[:log_command]) - local_options = local_options.merge(:logger => logger) + local_options = local_options.merge(logger: logger) end Terrapin::CommandLine.new(cmd, arguments, local_options).run(interpolation_values) end # Find all instances of the given Active Record model +klass+ with attachment +name+. @@ -42,10 +42,10 @@ yield(instance) end end def class_for(class_name) - class_name.split('::').inject(Object) do |klass, partial_class_name| + class_name.split("::").inject(Object) do |klass, partial_class_name| if klass.const_defined?(partial_class_name) klass.const_get(partial_class_name, false) else klass.const_missing(partial_class_name) end