Forum: Ruby on Rails Module and model names

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.
Rodrigo A. (Guest)
on 2006-02-21 13:24

I have a Admin < User model (STI), and I want to create an Admin module
to group some controllers. So i have a model and a module with the same
name. If i query the database for an Admin User in one of those
controllers, rails tells me that there is a TypeError. I can't specify
model :admin in the controller, since it doesn't works. I can fix this
by require 'models/admin.rb', but i would like to know if there is a
better way of doing this.

This topic is locked and can not be replied to.