On Thu, 13 Mar 2008, Max W. wrote:
?? Ie, to override rails configuration in this instance?
Never mind, i managed to figure it out: my problem was actually with
resource_this, which was generating my controller methods. I just
needed to pass a :class_name option to resource_this.
In general it’s worth knowing that the controller-model linkage is
essentially arbitrary. Controllers are just objects, and models are
classes. All model classes are visible to all controllers. You have to
decide how you want your domain controlled – that is, how the gears
work between your controller layer and your model layer. There are
some high-level conventions and bundled behaviors, like resource
routing, that save you from having to think it through completely from
scratch every time, but it’s still always under your control.
Upcoming Rails training from David A. Black and Ruby Power and Light:
ADVANCING WITH RAILS, April 14-17 2008, New York City
CORE RAILS, June 24-27 2008, London (Skills Matter)
See http://www.rubypal.com for details. Berlin dates coming soon!