ruby on rails - Singleton can't be dumped - cached_resource gem -


using cached_resource gem caching active resources.

user model

class user < activeresource::base   cached_resource    class teachers < simpledelegator     attr_accessor :teacher_id      def initialize(attributes = {}, _persisted = true)       @teacher_id = attributes['teacher_id']       super(user.find(@teacher_id))     end   end end 

i trying cache user resources.

/users/:user_id

whenever calling /users/:user_id endpoint gives me error singleton can't dumped @ line super(user.find(@teacher_id))

please suggest if other gem can me in caching activeresource calls.

gem activeresource-response causing problem. making class singleton. because of throughing singleton dump error.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -