
Connect Rails Application to already existing MySql Database
1
Databases
Hi there, I am new to Rails and really enjoying it. I am converting my php application to a ROR application. The app is using a MySql DB, so I want to connect the ROR application with that alr...
Thomas R. Koll replied

When to setup associations in Rails db?
0
Databases
I've always wondered if there is a better way to help database query performance in rails by breaking up tables with lots of columns? Any recommendations would be appreciated.Does it make more sens...
Javid Freeman posted

Should Categories be it's own resource or model attribute?
4
Databases
Hey guys, I have a question on database design. Say I have a Post model that has/belongs to a category (out of about 20 categories or so). I am thinking of two options that have their own meri...
Ariff Munshi replied
Solved

DB Structure for custom forms
6
Databases
Hi all,I am building an app that has the ability to create/edit forms with custom fields as a feature. Form templates can be assigned to personal record to be completed by users (google forms? :) )...
Jacob Montgomery replied

Help with database design and associations
0
Databases
I have taken a look at Polymorphic associations and STI but I don't really know if they apply to my specific use case. In my app I have the following relevant classes:class Restaurant < Applicat...
Alvaro Lobato posted

Is a Rails 5/react.js app only using GraphQL feasible?
3
Databases
I'm building a new app: rails 5 for the backend, react.js (actually Gatsby) for the frontend. Is it possible/desirable to do it all using GraphQL and skip REST endpoints entirely?
Jacob Warren replied

Logic on nested forms/related tables
2
Databases
I'm trying to improve my modles for an existing scenario, but I just can't get my head around it. The situation is that I want to list a range of coffee's and include the country and region of the...
Simon Cooper replied

Multi tenant - will it help?
0
Databases
Here is the case , I got users and a few other models , most of them end up doing some action with one main table that contains around 15M rows.
I have an indexed foreign key between the main tabl...
Ohad Dahan posted

Polymorphic, STI, or something else?
0
Databases
I am working on an app for a real estate company.
There will be 2 resources, Listings and Rentals. They will have a lot of the same data (address, beds, baths, sqft, etc.) but also different (ren...
Billy Purdy posted

How do I update value from one scaffold with the value of another scaffold?
2
Databases
I'm doing a project that contains a stock, I first created the stock scaffold like this:
```
rails generate scaffold stock name:string amount:float kind:string
```
And then a stock_flow scaffold ...
Tatiane Stivelman replied
Solved

Handle schema changes and data changes using migrations?
1
Databases
ashley [2:18 PM]
What are different strategies folks use for handling _schema changes_ and _data changes_ and using *migrations*? *Once you have a production system running but need to do schema ...
Tabish Iqbal replied

How to transform this spreadsheet into a database model - see example code
0
Databases
Hi everyone!
I have to transform this spreadsheet [Spreadsheet](https://www.dropbox.com/s/w9gqasloxre9sr7/spreadsheet-mechatronics-engineer.png?dl=0) into database model. This spreadsheet is part ...
Sebastian posted

Incorrect setup for Model associations
2
Databases
I feel these associations are incorrectly set up. It's a bit similar to Trello, except I'm adding in a 'client' model too. The main part that's confusing to me is the fact user.rb, it's just buggin...
Masud Hossain replied

Are there any WORM (write once, read many) data stores that integrate well with Rails?
0
Databases
I've gotta store a bunch of events, which are snippets of data that contain information about a thing that happened inside the system I'm working on. I'm building out audit trail, which could poten...
Chris Zempel posted

Is it better to create 'duplicate' inverse join records or traverse via ruby/rails?
0
Databases
I am buidling an application for real estate centered around comparing properties. I have a self referential relationship, Comps, which joins two properties and stores some additional data.
Giv...
Thomas Bush posted

How Do I Create an App Where Each User Has A Separate Table
3
Databases
Hi,
I want to create a web app which is a simple HR SaaS. Each user/company which registers will have get a separate table to upload list of employees. In terms of autorization a user/company can ...
Tabish Iqbal replied
Solved

[HATCH] - Deleting separate applications on the same server?
6
Databases
I've been deploying several toy apps on the same server, but after I'm finished with them I would love to easily be available to delete them using Hatch's interface, instead of having to SSH into t...
Scott Johnson replied
Solved

How to perform bulk update in rails?
1
Databases
Hi there,
Here is the problem in more detail. I tried to perform bulk update on rails model, but ended up with normal save method. I have some number of records and i wanted to update their values...
ankit.k@cisiblabs.com replied

Polymorphic relationship vs STI vs Class table inheritance with RoR
4
Databases
Hi I watch your tuts and it's pretty helpful. Always thanks!
I have some question about database design.
There are three types of invoice items with following tables
1) **SubscriptionItems**,
2)...
Unknown replied

Some good ways of seeding data in my app?
2
Databases
I need some seed data for my app. How do I seed Devise users, and always as images for Paperclip?
karl replied