We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to figure out how to use results caching with following rabl:
object false child :employees => :data do extends "employees/_single" end node(:success) { true } node(:total) { employees.size }
If I just add cache then run into error ActionView::Template::Error: undefined method 'cache_key' for nil:NilClass
cache
ActionView::Template::Error: undefined method 'cache_key' for nil:NilClass
If add cache with a block
object false cache { |_| "#{ employees.cache_key }" } child :employees => :data do extends "employees/_single" end node(:success) { true } node(:total) { employees.size }
then it can't resolve employees: ActionView::Template::Error: undefined local variable or method 'employees' for RablRails::Renderers::JSON:Module
employees
ActionView::Template::Error: undefined local variable or method 'employees' for RablRails::Renderers::JSON:Module
What's the right approach here?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to figure out how to use results caching with following rabl:
If I just add
cache
then run into errorActionView::Template::Error: undefined method 'cache_key' for nil:NilClass
If add
cache
with a blockthen it can't resolve
employees
:ActionView::Template::Error: undefined local variable or method 'employees' for RablRails::Renderers::JSON:Module
What's the right approach here?
The text was updated successfully, but these errors were encountered: