Skip to content
Demo rails project demonstrating using JSONB fields to store collections of embedded models.
Ruby HTML JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
lib
log
public
storage
tmp
vendor
.gitignore
.rbenv-gemsets
.ruby-version
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru
package.json

README.md

Use JSONB fields as collections of embedded models

See complete guide in my blogpost: Store collections in JSONB field

Requirements

You need ruby 2.6.1 and PostgreSQL 11 installed. Older versions should work too but you'll have to update the Gemfile and .ruby-version files.

Setup

  • clone this repo
  • create the database with sample data: bundle exec rails db:setup
  • start server bundle exec rails s
  • browse to localhost:3000
You can’t perform that action at this time.