STI isn't working for me

Hey Josh,
    Have a look at the following wiki; http://wiki.rubyonrails.org/rails/pages/SingleTableInheritance, specifically the 'note' part.* "Note:* Rails must ‘see’ the file containing the STI classes before it can use them, otherwise you’ll end up with a “uninitialized constant” error. This can be a problem if the name of the class and the name of the file defining it are not the same, e.g. you have the model ‘Manager’ in the file ‘employees.rb’. Rails will not be able to divine the filename from the class name in this case."

    I take it that this is what is biting you :slight_smile:
    Regards
    Stef

Josh Kieschnick wrote:

Hey Josh,
    Well, personally, I am all for thinking about the person that comes -after- you (so to speak). Putting them into seperate model files is probably 'saner' in my view. Even if your only doing this on your own application, its probably a good habit to get into .. but .. thats jst my 2cents and all coding style is highly subjective. I would hate to come across as a pythonista :stuck_out_tongue_winking_eye: :stuck_out_tongue:

    Regards
    Stef

Josh Kieschnick wrote: