couch_potato icon indicating copy to clipboard operation
couch_potato copied to clipboard

Confusion about the create_id

Open hadmut opened this issue 1 year ago • 0 comments

Hi, I'm having two apps using couch_potato, i.e.

  • a very simple as a Rakefile just to test and learn how to use couch_potato
  • a Sinatra application making real use of couch_potato.

I noticed that with the simple test app, the document entry determining the ruby class is named "ruby_class", like

"ruby_class": "User"

while in the more complex Sinatra application it is something like

"json_class": "User",

Although couch_potato.rb starts with JSON.create_id = 'ruby_class'

it seems to depend on the order of libraries loaded, or other libraries seem to change it, however, it looks as if it could cause trouble when loading such documents.

hadmut avatar May 07 '24 09:05 hadmut