Forum: Ruby on Rails Problem with models and modules.

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Nick S. (Guest)
on 2006-01-04 19:13
(Received via mailing list)
Hi all, I'm having some very strange problems with my current setup.
I'm trying to organize my models into seperate modules so its easier
to tell things apart, but its not working.

Here's one oditiy, on top of a lot of others. In my app controller I
require the model:
require 'module/model_name'

And I know I have a typo in the validates part that should through an
error when I try to make a new object, but it only does it the first
time the page loads, after that, nothing. Also, the validation doesn't
seem to keep its error messages, in the controller the model.valid?
returns false, but then the model.errors wont have any errors!

I dont know whats happening, but would gladly take some advice. How do
you folks organize your model classes? Or do you? I dislike having
everything in one directory, but right now it looks like I have too.

Thanks for the help!
This topic is locked and can not be replied to.