Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
119 views

How to load nested json from ActiveSerializer?

I want to develop methods for a JSON import/export system. With a simple example where we have a cat with paws, I made this : class Cat < ApplicationRecord has_many :paws def json_export ...
Neustrony's user avatar
2 votes
1 answer
182 views

Deserialized Rails ActiveRecord object won't save to SQL database

Problem: After serializing and deserializing an object, a perfectly valid ActiveRecord model object will not save to SQL database. The objects are serialized with: File.open(output_file, 'wb+') { |f|...
Jay's user avatar
  • 624
1 vote
1 answer
1k views

What does it mean to serialize/ deserialize a session?

In reading about Rails, I encountered the phrase "rails will read the cookie and deserialize the session", but I don't know what the second part means. I've googled and searched SO, and found ...
rainbowsorbet's user avatar
2 votes
1 answer
3k views

Saving and retrieving an Array in Rails

I'm developing an e-learning in Rails and I want to save a set of Arrays to the database, with the aim of tracking a user's progress through the various sections of the e-learning. I've come across ...
moosefetcher's user avatar
  • 1,901
0 votes
1 answer
312 views

Search in mysql database - unserialized data

Situation: I have user model. attribute "meta_data" in db represents "text" type field. In model it seriazized by custom class. ( serialize :meta_data, CustomJsonSerializer.new ) It means, when I ...
Maltsev Konstantin's user avatar
1 vote
1 answer
2k views

newbie: append serialized integers into database column and retrieve them back

How Could I store integers (user id's ranging from 1 to 9999) serialized in a database column and retrieve them back? In my User model I have invites column, User model serialize: invites invites = ...
Rubytastic's user avatar
  • 15.5k