Skip to main content
How do I improve these relationships (Rails Association question) ?
Databases Solved • Asked by Ignacio Alonso
Im trying to make a project to practice more kinds of associations would you kindly help me understand this? The basic idea is to have a betting game where one user generates a new bet that can ...
2
posts

Design a store credit schema
Databases • Asked by gafemoyano
Hi, I was wondering if anyone has some experience building a store credit system into a market place style app. Eg: Users could purchase 100USD in adavance and receive 120USD in store credits as in...
1
post

NameError (undefined local variable or method `fetch_records' for ....
Databases Solved • Asked by Victor Nizeyimana
Hi, I'm getting this wierd error. ``` NameError (undefined local variable or method `fetch_records' for #): app/controllers/admin_controller.rb:69:in `block (2 levels) in comments' app/con...
4
posts

How do I switch from 1 database to 1 database per client?
Databases Solved • Asked by John van Arkelen
I have a multi-tenancy app where everything is stored in 1 Postgres database. All models have a account_id, so the data a customer can see is based on his account_id. This works perfect, but due to...
7
posts

How do I convert a SQL query to rails?
Databases • Asked by Emrah Yıldırım
Hi, I'm new to ROR. The query I created below is functioning properly. I'm trying to prepare an interrogation. But I didn't succeed. The query is as follows; @rad_check.tenant_id = SELECT gro...
1
post

Loosing my attached_images when cap deploy after switching my path so that my posts stay
Databases • Asked by Sebastian
Okay one last question :) To avoid that cap production deploy is killing my Posts from the database i added production: adapter: sqlite3 database: /home/deploy/apps/Blogapp/releases/sha...
2
posts

How do I write the correct association?
Databases • Asked by Arzee
If I wanted to have a "user_type" column in my "users" table that references to another table called "user_type", how do I write the correct association in rails? For example if my user_type is 1 a...
1
post

PG::InsufficientPrivilege: ERROR: permission denied to create extension "pgcrypto" HINT: Must be superuser to create this extension. : CREATE EXTENSION IF NOT EXISTS "pgcrypto"
Databases • Asked by Juan S. Caro
Hi everyone, I have been deploying following the guides of this site. However, I had introduced the use of UUID and so I have set the use of extensions for PostgreSQL. Now, when I deploy, I get the...
1
post

What database should I use?
Databases • Asked by Michael Victor
I would like to create a database to store how often access tokens in my system are being used.I was thinking of a data model like so -Access Tokenfrom (basically I will store this hourly, so this ...
2
posts

Database Disconnect Error
Databases • Asked by russell depp
HI,Most of the time I leave my DB management tool, like DBeaver, open on my computer. Sometimes after a long period of time I get an error because the connection has been dropped or reset. Specific...
1
post

Subscribe to the newsletter

Join 18,000+ 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.