rails_best_practices

https://github.com/flyerhzm/rails_best_practices

Ruby

a code metric tool for rails projects

RailsBestPractices::Reviews::KeepFindersOnTheirOwnModelReview#other_finder?

check if the call node is the finder of other model.

the message of the node should be one of find, all, first or last,
and the receiver of the node should be with message :call (this is the other model),
and any of its arguments is a hash,
then it is the finder of other model.

Source | Google | Stack overflow

Edit

git clone [email protected]:flyerhzm/rails_best_practices.git

cd rails_best_practices

open lib/rails_best_practices/reviews/keep_finders_on_their_own_model_review.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-RailsBestPractices--Reviews--KeepFindersOnTheirOwnModelReview-other_finder--for-pr


# Commit to git

git add lib/rails_best_practices/reviews/keep_finders_on_their_own_model_review.rbgit commit -m "better docs for RailsBestPractices::Reviews::KeepFindersOnTheirOwnModelReview#other_finder?"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-RailsBestPractices--Reviews--KeepFindersOnTheirOwnModelReview-other_finder--for-pr

hub pull-request


# Celebrate!