When to setup associations in Rails db?
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?
Hey Simon, Thanks for your answer! Never actually thought of it that way. Come to think of it, it makes the most sense. Cheers!Ariff Munshi replied • Solved
DB Structure for custom forms
Hey Luca, Thanks for the link! I had that same article bookmarked from a while back but never made it back to it, haha!I think I have a better idea of what you're talking about here now, so I still...Jacob Montgomery replied
Help with database design and associations
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?
Really, if you don't use Relay, you won't need the pro version. That's the only GraphQL gem I'm familiar with, though.Jacob Warren replied
Logic on nested forms/related tables
Hey Robert. Thanks for the response. I've ended up just going with a triple nested form: ``` class Roast < ApplicationRecord has_many :countries end class Country < Applicati...Simon Cooper replied
Multi tenant - will it help?
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 ta...Ohad Dahan posted
Polymorphic, STI, or something else?
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 (r...Billy Purdy posted
How do I update value from one scaffold with the value of another scaffold?
It worked very well, thanksTatiane Stivelman replied • Solved
Handle schema changes and data changes using migrations?
ashley [5:41 PM] _“model obesity”_ excellent term, @inopinatus! This is a _software engineering_ issue not limited to Rails, for sure. It’s interesting to me that there’s never been a grou...Tabish Iqbal replied
How to transform this spreadsheet into a database model - see example code
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 par...Sebastian posted
Incorrect setup for Model associations
@Tabish Iqbal, do you mind showing me how the models would be set up? I don't seem to understand how the self joins would work in this case.Masud Hossain replied
What could be the best way to deal with addresses in terms of database structure and perfomance?
I have quite a strong opinion when it comes to data modelling. I'll present it here but keep in mind that others may have different views - I'm just one commentator! To me it looks both overcomp...inopinatus replied
Are there any WORM (write once, read many) data stores that integrate well with Rails?
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?
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. G...Thomas Bush posted
How Do I Create an App Where Each User Has A Separate Table
For anyone interested this post talks about how to setup multi-tenancy using uuid's and not subdomains using postgresql. http://andrewmarkle.com/2016/04/06/multitenancy-with-pundit/Tabish Iqbal replied • Solved
[HATCH] - Deleting separate applications on the same server?
Congrats Chris on getting this live. That looks like a great feature.Scott Johnson replied • Solved
How to perform bulk update in rails?
Try this https://github.com/zdennis/activerecord-import[email protected] replied
Polymorphic relationship vs STI vs Class table inheritance with RoR
Also In the first example, I simplifid too much `usage item` entity. It has more than 4 ~ 6 different column from other types of invocie items. (`subscription item`, and `proration`) So it's not...Unknown replied