Sha256: 810e79bd0dba7970973cd77ddbaa2e4c0b56c682bd971102c7c6d2035d230261
Contents?: true
Size: 763 Bytes
Versions: 9
Compression:
Stored size: 763 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/806-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/806-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
9 entries across 9 versions & 1 rubygems