Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Off the Rails: Patterns for fixing fat models, ...

Off the Rails: Patterns for fixing fat models, out-of-controllers, and other Rails problems

Alexander Clark

April 23, 2019
Tweet

More Decks by Alexander Clark

Other Decks in Technology

Transcript

  1. MVC

  2. Controller Rule of Thumb A Controller May Contain: • Public

    REST methods • Private before_action setters • Private strong params method
  3. Further reading • https://codeclimate.com/blog/7-ways-to-decompose-fat- activerecord-models/ • Patterns of Enterprise Application

    Architecture (Fowler) • Domain Driven Design (Evans) • All the Little Things (Metz) https://www.youtube.com/ watch?v=8bZh5LMaSmE • Ruby Object Mapper https://rom-rb.org/