fat-code-refactoring-techniques icon indicating copy to clipboard operation
fat-code-refactoring-techniques copied to clipboard

Earlier Draft: Business logic in models rather than Service Object or private Controller methods

Open justin808 opened this issue 11 years ago • 0 comments

Clean up complicated controller method by moving logic to models

  • Create ProfanityChecker model to encapsulate logic of checking for profanity.
  • Moved business logic from micropost controller to user and microposts models
  • Created controller spec that verifies
    • flash messages set correctly
    • redirect or rendering done

Review on Reviewable

justin808 avatar Apr 11 '14 20:04 justin808