2007-02-10 00:12:31 +01:00
|
|
|
Description:
|
2007-12-21 08:48:59 +01:00
|
|
|
Stubs out a new observer. Pass the observer name, either CamelCased or
|
|
|
|
under_scored, as an argument.
|
2007-02-10 00:12:31 +01:00
|
|
|
|
2007-12-21 08:48:59 +01:00
|
|
|
The generator creates an observer class in app/models and a unit test in
|
2007-02-10 00:12:31 +01:00
|
|
|
test/unit.
|
|
|
|
|
|
|
|
Example:
|
2007-12-21 08:48:59 +01:00
|
|
|
`./script/generate observer Account`
|
2007-02-10 00:12:31 +01:00
|
|
|
|
2007-12-21 08:48:59 +01:00
|
|
|
creates an Account observer and unit test:
|
2007-02-10 00:12:31 +01:00
|
|
|
Observer: app/models/account_observer.rb
|
|
|
|
Test: test/unit/account_observer_test.rb
|