标签: ruby-on-rails
按照5.1版缓存指南,我编写了以下代码:
Rails.cache.fetch("#{cache_key}/#{params[:q]}") do @results = @q.result end
但我收到此错误:
undefined local variable or method `cache_key'