rails_best_practices

https://github.com/flyerhzm/rails_best_practices

Ruby

a code metric tool for rails projects

RailsBestPractices::Reviews::OveruseRouteCustomizationsReview#member_and_collection_count_for_rails2

check command_call node to calculate the count of member and collection custom routes.
this is for rails2 syntax.

if the message of command_call node is "resources",
and the second argument is a hash,
then calculate the pair (key/value) count,
it is just the count of member and collection custom routes.

Source | Google | Stack overflow

Edit

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

cd rails_best_practices

open lib/rails_best_practices/reviews/overuse_route_customizations_review.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-RailsBestPractices--Reviews--OveruseRouteCustomizationsReview-member_and_collection_count_for_rails2-for-pr


# Commit to git

git add lib/rails_best_practices/reviews/overuse_route_customizations_review.rbgit commit -m "better docs for RailsBestPractices::Reviews::OveruseRouteCustomizationsReview#member_and_collection_count_for_rails2"


# 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--OveruseRouteCustomizationsReview-member_and_collection_count_for_rails2-for-pr

hub pull-request


# Celebrate!