我需要在项目中使用imgix-rails gem。
我需要在模型中调用一个助手,这个助手:
require "imgix"
require "imgix/rails/tag"
require "imgix/rails/image_tag"
require "imgix/rails/picture_tag"
module Imgix
module Rails
module ViewHelper
include UrlHelper
def ix_image_tag(source=nil, path, tag_options: {}, url_params: {}, srcset_options: {})
return Imgix::Rails::ImageTag.new(path, source: source, tag_options: tag_options, url_params: url_params, srcset_options: srcset_options).render
end
def ix_picture_tag(source=nil, path, tag_options: {}, url_params: {}, breakpoints: {}, srcset_options: {})
return Imgix::Rails::PictureTag.new(path, source: source, tag_options: tag_options, url_params: url_params, breakpoints: breakpoints, srcset_options: srcset_options).render
end
end
end
end
我找不到打电话的方法ix_image_tag
。