aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators/components/observer/USAGE
blob: a5d744a3c2af7c893e5dc8d895bf0dc6719532f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
Description:
    Stubs out a new observer. Pass the observer name, either CamelCased or
    under_scored, as an argument.

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

Example:
    `./script/generate observer Account`

    creates an Account observer and unit test:
        Observer:   app/models/account_observer.rb
        Test:       test/unit/account_observer_test.rb