Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

66 lines (55 sloc) 7.601 kB
Parameter.destroy_all
Configuration.destroy_all
Category.destroy_all
category = Category.create(name: "Move code from Controller to Model")
category.configurations.create(name: "MoveFinderToNamedScopeCheck", description: "Move finder to named_scope", url: "http://rails-bestpractices.com/posts/1-move-finder-to-named_scope")
category.configurations.create(name: "UseModelAssociationCheck", description: "Use model association", url: "http://rails-bestpractices.com/posts/2-use-model-association")
category.configurations.create(name: "UseScopeAccessCheck", description: "Use scope access", url: "http://rails-bestpractices.com/posts/3-use-scope-access")
category.configurations.create(name: "AddModelVirtualAttributeCheck", description: "Add model virtual attribute", url: "http://rails-bestpractices.com/posts/4-add-model-virtual-attribute")
configuration = category.configurations.create(name: "ReplaceComplexCreationWithFactoryMethodCheck", description: "Replace complex creation with factory method", url: "http://rails-bestpractices.com/posts/6-replace-complex-creation-with-factory-method")
configuration.parameters.create(name: "attribute_assignment_count", kind: "integer", value: 2, description: "attribute assignment count")
configuration = category.configurations.create(name: "MoveModelLogicIntoModelCheck", description: "Move model logic into model", url: "http://rails-bestpractices.com/posts/7-move-model-logic-into-the-model")
configuration.parameters.create(name: "use_count", kind: "integer", value: 4, description: "use count")
category = Category.create(name: "RESTful Conventions")
configuration = category.configurations.create(name: "OveruseRouteCustomizationsCheck", description: "Overuse route cutomizations", url: "http://rails-bestpractices.com/posts/10-overuse-route-customizations")
configuration.parameters.create(name: "customize_count", kind: "integer", value: 3, description: "customize count")
configuration = category.configurations.create(name: "NeedlessDeepNestingCheck", description: "Needless deep nesting", url: "http://rails-bestpractices.com/posts/11-needless-deep-nesting")
configuration.parameters.create(name: "nested_count", kind: "integer", value: 2, description: "nested count")
category.configurations.create(name: "NotUseDefaultRouteCheck", description: "Not use default route", url: "http://rails-bestpractices.com/posts/12-not-use-default-route-if-you-use-restful-design")
category.configurations.create(name: "RestrictAutoGeneratedRoutesCheck", description: "Restrict auto generated routes", url: "http://rails-bestpractices.com/posts/86-restrict-auto-generated-routes")
category = Category.create(name: "Model")
category.configurations.create(name: "KeepFindersOnTheirOwnModelCheck", description: "Keep finders on their own model", url: "http://rails-bestpractices.com/posts/13-keep-finders-on-their-own-model")
category.configurations.create(name: "LawOfDemeterCheck", description: "Law of demeter", url: "http://rails-bestpractices.com/posts/15-the-law-of-demeter")
category.configurations.create(name: "UseObserverCheck", description: "Use observer", url: "http://rails-bestpractices.com/posts/19-use-observer")
category.configurations.create(name: "UseQueryAttributeCheck", description: "Use query attribute", url: "http://rails-bestpractices.com/posts/56-use-query-attribute")
configuration = category.configurations.create(name: "RemoveUnusedMethodsInModelsCheck", description: "Remove unused methods in models")
configuration.parameters.create(name: "except_methods", kind: "array", value: "", description: "except methods")
category = Category.create(name: "Mailer")
category.configurations.create(name: "UseMultipartAlternativeAsContentTypeOfEmailCheck", description: "Use multipart alternative as content type of email", url: "http://rails-bestpractices.com/posts/41-use-multipart-alternative-as-content_type-of-email")
category = Category.create(name: "Migration")
category.configurations.create(name: "IsolateSeedDataCheck", description: "Isolate seed data", url: "http://rails-bestpractices.com/posts/20-isolating-seed-data")
category.configurations.create(name: "AlwaysAddDbIndexCheck", description: "Always add db index", url: "http://rails-bestpractices.com/posts/21-always-add-db-index")
category.configurations.create(name: "UseSayWithTimeInMigrationsCheck", description: "Use say with time in migrations", url: "http://rails-bestpractices.com/posts/46-use-say-and-say_with_time-in-migrations-to-make-a-useful-migrati")
category = Category.create(name: "Controller")
configuration = category.configurations.create(name: "UseBeforeFilterCheck", description: "Use before filter", url: "http://rails-bestpractices.com/posts/22-use-before_filter")
configuration.parameters.create(name: "customize_count", kind: "integer", value: 2, description: "customize count")
category.configurations.create(name: "SimplifyRenderInControllersCheck", description: "Simplify render in controllers", url: "http://rails-bestpractices.com/posts/62-simplify-render-in-controllers")
configuration = category.configurations.create(name: "RemoveUnusedMethodsInControllersCheck", description: "Remove unused methods in controllers")
configuration.parameters.create(name: "except_methods", kind: "array", value: "", description: "except methods")
category = Category.create(name: "Helper")
category.configurations.create(name: "RemoveEmptyHelpersCheck", description: "Remove empty helpers", url: "http://rails-bestpractices.com/posts/72-remove-empty-helpers")
configuration = category.configurations.create(name: "RemoveUnusedMethodsInHelpersCheck", description: "Remove unused methods in helpers")
configuration.parameters.create(name: "except_methods", kind: "array", value: "", description: "except methods")
category = Category.create(name: "View")
category.configurations.create(name: "MoveCodeIntoControllerCheck", description: "Move code into controller", url: "http://rails-bestpractices.com/posts/24-move-code-into-controller")
configuration = category.configurations.create(name: "MoveCodeIntoModelCheck", description: "Move code into model", url: "http://rails-bestpractices.com/posts/25-move-code-into-model")
configuration.parameters.create(name: "use_count", kind: "integer", value: 2, description: "use count")
configuration = category.configurations.create(name: "MoveCodeIntoHelperCheck", description: "Move code into helper", url: "http://rails-bestpractices.com/posts/26-move-code-into-helper")
configuration.parameters.create(name: "array_count", kind: "integer", value: 3, description: "array count")
category.configurations.create(name: "ReplaceInstanceVariableWithLocalVariableCheck", description: "Replace instance variable with local variable", url: "http://rails-bestpractices.com/posts/27-replace-instance-variable-with-local-variable")
category.configurations.create(name: "SimplifyRenderInViewsCheck", description: "Simplify render in views", url: "http://rails-bestpractices.com/posts/61-simplify-render-in-views")
category = Category.create(name: "Deployment")
category.configurations.create(name: "DryBundlerInCapistranoCheck", description: "Dry bundler in capistrano", url: "http://rails-bestpractices.com/posts/51-dry-bundler-in-capistrano")
category = Category.create(name: "Other")
category.configurations.create(name: "RemoveTrailingWhitespaceCheck", description: "Remove trailing whitespace", url: "http://rails-bestpractices.com/posts/60-remove-trailing-whitespace")
category.configurations.create(name: "RemoveTabCheck", description: "Remove tab", url: "http://rails-bestpractices.com/posts/81-remove-tab")
Jump to Line
Something went wrong with that request. Please try again.