[SOLVED] Rails.cache.fetch exception: TypeError (<ModelName> can't be referred to)

Issue I’m implementing some caching by using the nifty Rails.cache.fetch. However, in one particular instance, sometimes I encounter an exception: TypeError in EmloController#index Emlo can’t be referred to app/controllers/emlo_controller.rb:320:in `get_employees’ app/controllers/emlo_controller.rb:356:in `prepare_json_response’ app/controllers/emlo_controller.rb:23:in `block (2 levels) in index’ app/controllers/emlo_controller.rb:15:in `index’

Continue reading