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

Interactor

 Interactor

Talk given at Grand Rapids Ruby meetup with @laserlemon

Daniel Morrison

February 03, 2014
Tweet

More Decks by Daniel Morrison

Other Decks in Programming

Transcript

  1. collectiveidea.com
    Interactor
    Steve Richert
    @laserlemon
    Daniel Morrison
    @danielmorrison
    @collectiveidea

    View full-size slide

  2. collectiveidea.com
    Before:
    A typical controller

    View full-size slide

  3. collectiveidea.com

    View full-size slide

  4. collectiveidea.com
    Step 1:
    Use an interactor

    View full-size slide

  5. collectiveidea.com

    View full-size slide

  6. collectiveidea.com

    View full-size slide

  7. collectiveidea.com
    Step 2:
    Use an Organizer

    View full-size slide

  8. collectiveidea.com

    View full-size slide

  9. collectiveidea.com

    View full-size slide

  10. collectiveidea.com

    View full-size slide

  11. collectiveidea.com

    View full-size slide

  12. collectiveidea.com
    Our Controller
    hasn’t changed!

    View full-size slide

  13. collectiveidea.com

    View full-size slide

  14. collectiveidea.com
    What about Tests?

    View full-size slide

  15. collectiveidea.com
    Smaller, simpler tests.

    View full-size slide

  16. collectiveidea.com

    View full-size slide

  17. collectiveidea.com
    How do I get it?

    View full-size slide

  18. collectiveidea.com
    collectiveidea/interactor
    gem install interactor
    gem install interactor-rails

    View full-size slide