views:

146

answers:

2

I came across a controller in an older set of code (Rails 1.2.3) that had the following in a controller:

class GenericController > ApplicationController
    # filters and such
    model :some_model

Although the name of the model does not match the name of the model, is there any reason to specify this? Or is this something that has disappeared from later versions of Rails?

+1  A: 

Yes, that is something that has disappeared in later versions of Rails. There is no need to specify it.

Joe Van Dyk
+4  A: 

This had to do with dependency injection. I don't recall the details.

By now it's just a glorified require, which you don't need because rails auto-requires files for missing constants.

kch