I need to store a js object in a ruby class then pass it back to js later intact.
just for some context I have a fallback but its not efficient. I Can chop up the js object and pass the values as strings one by one and piece it back together but its a lot of data.
On my js side if i can keep the js object intact i can simply pass the object back to js and I'm set.
For further context what I'm trying to do is store an ace editor session ace.edit("editor").getSession() which returns QUITE alot of data as you can see below
inside of one of a Ruby class to pass back to my js later. The editor session contains ALOT of settings things like language mode , editor theme, font size toggle wrap you get the point all those settings you have in your editor on your env I need to store. Ive passed back the important ones already, things like language and theme but want to pass the whole session so the user-x is as close to working on the editor in your env as possible
I am brand new to js and just started diving into it on this project so please if you can when answered share some pseudo or a snippet I can analyze. Thanks ahead of time

CodeSnippetclass model every snippet has aSessionwith ace editor i can simply setSession(pass the js object here) so nothing needs to be done on the ruby side besides associating it to my model