0 Replies Latest reply on Jul 12, 2012 6:37 AM by Steve Zhang

    Why model object so special which does not need 'require' method?

      I found an interesting thing that it seems the model object does not need to specify 'require' method at the beginning, for example:

      I can directly use the model object in a class in a different folder, either in a controller class or another model object,  I haven't try it on the erb view file yet.

       

      But for other regular ruby class file, I have to specify the 'require' statement at the beginning.

       

      For controller, I found if I want to inside one controller to call another controller's method, I have to specify  'require some_model/some_controller'.

       

       

      Why is the model object so special, can anybody explain the mechanism to me?

       

      Thanks

       

      Steve