instiki/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE

14 lines
420 B
Plaintext
Raw Normal View History

2007-02-10 00:12:31 +01:00
Description:
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
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:
`./script/generate observer Account`
2007-02-10 00:12:31 +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