rails_best_practices
https://github.com/flyerhzm/rails_best_practices
Ruby
a code metric tool for rails projects
RailsBestPractices::Reviews::UseObserverReview#deliver_mailer?
check a def node to see if it contains a actionmailer deliver call. for rails2 if the message of call node is deliver_xxx, and the receiver of the call node exists in @callbacks, for rails3 if the message of call node is deliver, and the receiver of the call node is with receiver node who exists in @callbacks, then the call node is actionmailer deliver call.
Edit
git clone [email protected]:flyerhzm/rails_best_practices.git
cd rails_best_practices
open lib/rails_best_practices/reviews/use_observer_review.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-RailsBestPractices--Reviews--UseObserverReview-deliver_mailer--for-pr
# Commit to gitgit add lib/rails_best_practices/reviews/use_observer_review.rbgit commit -m "better docs for RailsBestPractices::Reviews::UseObserverReview#deliver_mailer?"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-RailsBestPractices--Reviews--UseObserverReview-deliver_mailer--for-pr
hub pull-request
# Celebrate!