Should I store my Rails 3 observers in the app/models directory?
or do th开发者_开发技巧ey belong in their own place?
I agree with the convention, but when you find you've got a lot of observers in app/models, you might want to go ahead and store all your observers in app/observers. (There are also some gems to help streamline your design).
Just remember to add app/observers to your app's configured load path.
If you generate one (e.g., "rails g observer Test") that's where it goes, so I'd stick with the convention.
精彩评论