Skip to main content
Polymorphic Search
Databases • Asked by Dan Tappin
I have a basic model structure like this: ``` class History < ActiveRecord::Base belongs_to :historical, polymorphic: true, touch: true end ``` with several related models: `has_m...
1
post

How do I structure a Bookings table for two models?
Databases • Asked by Taylor Cooney
I've primarly built out support to book a flight, and now I'm looking to offer the ability to book a hotel as well. I'm looking for some insight on the best way to model this: Currently there is...
1
post

Transactions
Databases • Asked by Jacob Abraham
If I am working on a db with millions of users and i have a job that requires updating multiple tables, what is the best way to approach this? I was thinking to wrap it in a transaction but the iss...
1
post

How do I manage business hours for a store?
Databases Solved • Asked by Taylor Cooney
I've taken a few stabs at this over the past two months and haven't found a great solution for what seems to be a straightforward feature seen in applications such as SkipTheDishes and UberEats. ...
6
posts

How to do a incremental backup
Databases Solved • Asked by Nithil
Hey, taking a full backup every day will be huge, so thinking of doing a full backup once in a month & incremental backups every day or so. I would like to know the best solution to achieve this.
2
posts

PG::ConnectionBad: FATAL: password authentication failed for user "deploy" capistrano rails
Databases • Asked by Hitesh Ranaut
Hi I am working on deploying rails application to digital ocean everything is worked fine. just stuck on that final step: when I am runing `cap production deploy` I am getting &gt...
1
post

403 errors on Nginx server
Databases • Asked by SMEHSAN
Hello, I have installed ruby on rails on digital ocean with NGINX and Passanger. the site was working find but after trying to install free ssl, it goes full wrong. i was following this article...
1
post

find_by not returning array but class insance
Databases • Asked by jason Mardell
What am I missing please? class Choice < ApplicationRecord belongs_to :choiceable, polymorphic: true belongs_to :room_item, optional: false end create_table "choices", force: :cas...
1
post

How can I improve query time in SQL ? (PostgreSQL)
Databases Solved • Asked by Boris Bresciani
Hi, I have 4 models: ``` class Match < ApplicationRecord belongs_to :tournament scope :next, -> { where('date > ?', Time.zone.now) } end ``` ``` class Tournament < Ap...
2
posts

ibm Iseries AS/400 DB2
Databases Solved • Asked by Manuel Martinez
I'm trying to connect using some of the gems:sequel, dbi, ibm_db, jdbc-as400-adapterWithout success, does anyone have the same problem?
6
posts

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.