Forum: Ruby on Rails Re: Is old school STI broken? How would you do the same now?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Devin M. (Guest)
on 2006-04-03 21:58
(Received via mailing list)
-------------- Original message ----------------------
From: Chris T <removed_email_address@domain.invalid>
> 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
> declaration)
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.

Devin
This topic is locked and can not be replied to.