2008年5月8日 星期四

rails program load sequence

ex:  http://localhost:3000/rabbit/list
when getting request above, the load sequence is as follows:
1. load rabbit_controller.rb

2. instantiate an object of class RabbitController

3. look in app/helpers for rabbit_helper.rb.
    If found, the module RabbitHelper is mixed into RabbitController

4 look in app/models for rabbit.rb. If found, load it

define the models used in controller:
ex:
model  :car,  :clothes

define the observers used in controller:
ex:
observer   :car_observer

define the model used in controller 

沒有留言: