Can models access controller methods?

I have a method in a model that needs to access a method in a
controller. Is this possible to do?

  • Steve

on Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

On 12/5/06, Steve Q. [email protected] wrote:

I have a method in a model that needs to access a method in a
controller. Is this possible to do?

Maybe, but this would very strongly indicate a design flaw in your
application. Can you post some code for us to look at?

Cheers,
Max

This is definitely a design flaw. Model should not be aware of any
controller. It should never access any methods in the controller.