aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails_generator/generators/components/observer/USAGE
blob: 8abaf3678f0f2aba74ac136691f3ecf5bef18e46 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                  
Description:
    The observer generator creates stubs for a new observer.

    The generator takes a observer name as its argument.  The observer name may be
    given in CamelCase or under_score and should not be suffixed with 'Observer'.

    The generator creates a observer class in app/models and a test suite in
    test/unit.

Example:
    ./script/generate observer Account

    This will create an Account observer:
        Observer:   app/models/account_observer.rb
        Test:       test/unit/account_observer_test.rb