Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is an open ticket for this bug here: <a href="https://rails.lighthouseapp.com/projects/8994/tickets/188-single-table-inheritance-bug-only-in-production-environment" rel="nofollow noreferrer">https://rails.lighthouseapp.com/projects/8994/tickets/188-single-table-inheritance-bug-only-in-production-environment</a></p> <p>The solution is listed at the bottom of this ticket: <a href="https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2389-sti-changes-behavior-depending-on-environment" rel="nofollow noreferrer">https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2389-sti-changes-behavior-depending-on-environment</a></p> <p>To quote:</p> <blockquote> <p>You must explicitly name subclasses in the parent class</p> <p>class ProjectFeedEvent &lt; FeedEvent</p> <pre><code>def self.subclasses [ProjectAddedEvent] end </code></pre> <p>end</p> </blockquote> <p>Part of the reason this issue has been around for a while and has not received much attention is that STI is not commonly necessary in Rails. Most contributors to Rails have decided not to use it in their own projects and therefore do not put time into making sure that it is well supported. Here's a blurb that briefly explains why you should not use it and suggests an alternative: <a href="http://www.matthewpaulmoore.com/ruby-on-rails-code-quality-checklist#sti" rel="nofollow noreferrer">http://www.matthewpaulmoore.com/ruby-on-rails-code-quality-checklist#sti</a></p> <p>My own personal experiences using STI at my company was that is seemed very useful at first, but as time went on we determined that we simply didn't need it enough to warrant the complexity. Since then, our project has grown dramatically and we have not missed it at all.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload