Ok so here is my situation. Im a PHP developer recently turned Rails developer. In PHP code the use of abstract classes as "base" classes is a pretty common pattern. When moving onto my current Rails application I did a lot of the "pre-plan
I am fairly new to Rails and I would really appreciate some pointers in the right direction. I understand the pros and cons of STI.What would be the best practices for modeling AR-relations with a combination of Single table inheritance and polymorph
I have a model using single table inheritance and a concern that should work on any model.Consider this example:class Car acts_as_categorizable end class Suv < Car; end module Categorizable def after_safe siblings = this.class.where(category: self.ca
I'm working on Single Table Inheritance in Rails followingthis guide. The classes that I'm working with are as follows:Superclass:ArticlesSubclass:Tutorials, Projects, ThoughtsAll of them contain 'Comments'So I'm able to display all of these articles
I'm using an STI model with a single "Accounts" table to hold information for Users and Technicians (i.e. User < Account, Technician < Account). Everything works from a functional perspective, but things explode when running unit tests:...
I have been struggling for the past few hours thinking about which route I should go. I have a Notification model. Up until now I have used a notification_type column to manage the types but I think it will be better to create separate classes for th
Short explanation:I seek architectural advice and help in implementing multiple Devise models in a single app.More detailed explanation:My application needs to perform the following behavior:There are 3 types of users (Partner,Attendee,Speaker) which
I have setup a role based access controll system with the following models:Role (as STI),UserRole (global roles)ProjectRole (project specific roles)Assignment (Polymorphic with different resources)UserProject (as one resource type for assignments)Use