module SimpleActiveStorage

假设单个图片为picture 多个图片为pictures

Constants

VERSION

Public Class Methods

transformation(name,transformation = nil) { || ... } click to toggle source
# File lib/simple_active_storage/variation.rb, line 5
def self.transformation(name,transformation = nil,&block)
  self.transformations ||= {}
  if block_given?
    transformation = yield
  end
  transformations[name] = transformation
end
transformation_exists?(name) click to toggle source
# File lib/simple_active_storage/variation.rb, line 13
def self.transformation_exists?(name)
  self.transformations.keys.include? name
end
url_helpers() click to toggle source
# File lib/simple_active_storage/url.rb, line 3
def self.url_helpers
  Rails.application.routes.url_helpers
end