Re: Is old school STI broken? How would you do the same now?

-------------- Original message ----------------------
From: Chris T [email protected]

Have you declared the list model in application.rb?

class ApplicationController < ActionController::Base
model :list

You need to do this so the application knows about StaticList class (It
will only know about the subclass once it’s read the list.rb model
I Might Be Wrong, but I don’t think you don’t need to do this. Just name
the file static_list.rb – active_support overrides Object.const_missing
so that constant references get snake-cased and require’d.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs