Module: Imgproxy::Extensions::ActiveStorage

Defined in:
lib/imgproxy/extensions/active_storage.rb

Overview

Extension for ActiveStorage

Instance Method Summary collapse

Instance Method Details

#imgproxy_info_url(options = {}) ⇒ String

Returns imgproxy info URL for an attachment

Parameters:

Returns:

  • (String)

See Also:



21
22
23
24
# File 'lib/imgproxy/extensions/active_storage.rb', line 21

def imgproxy_info_url(options = {})
  return options.info_url_for(self) if options.is_a?(Imgproxy::Builder)
  Imgproxy.info_url_for(self, options)
end

#imgproxy_url(options = {}) ⇒ String

Returns imgproxy URL for an attachment

Parameters:

Returns:

  • (String)

See Also:



11
12
13
14
# File 'lib/imgproxy/extensions/active_storage.rb', line 11

def imgproxy_url(options = {})
  return options.url_for(self) if options.is_a?(Imgproxy::Builder)
  Imgproxy.url_for(self, options)
end