Sha256: c5129d84b18236653e72700e3107d390977b5229780ec506d57418320ea24480
Contents?: true
Size: 779 Bytes
Versions: 6
Compression:
Stored size: 779 Bytes
Contents
# encoding: utf-8 module RailsBestPractices module Reviews # Review model files to make sure not use default_scope # # See the best practice details here http://rails-bestpractices.com/posts/2013/06/15/default_scope-is-evil/ # # Implementation: # # Review process: # check all command node to see if its message is default_scope class DefaultScopeIsEvilReview < Review interesting_nodes :command interesting_files MODEL_FILES url "http://rails-bestpractices.com/posts/2013/06/15/default_scope-is-evil/" # check all command nodes' message add_callback :start_command do |node| if "default_scope" == node.message.to_s add_error "default_scope is evil" end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems