我正在寻找一个宝石或解决方案,以在控制器响应中生成图像。 如果能够在控制器中像这样完成就很好:respond_to :html, :png def show ... respond_to do |format| format.html format.png { ??...
class Api::StoresController < ApplicationController respond_to :json def index @stores = Store.all(:include => :products) resp...