RasMachineMan / rails-conf-workshop

Rails conf workshop playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CommandsWorkshop

This is the repository for the rails conf workshop

Overall explanations

It contains an example of fairly innocent code at first sight in the invitations_controller.

Its a basic example of what we face most of the time when code is shipped quickly. Even though it works and its tested, most of the logic is actually hidden in callbacks (who would expect a payment to be made just by reading the controller's code?). And as I've seen very often:

  • models are crying to get context (most of the time relying on additionnal instance variables).
  • and only happy path is taken into account which means data would be in a bad state if error happens somewhere

The refactoring we'll do is expected to fix this.

Setup

The app simpy uses sqlite3 as a db. I tried to keep minimum dependencies. Just install required gems

bundle

and then ensure everything is ok by running the specs:

rake

Course of action

About

Rails conf workshop playground

License:MIT License


Languages

Language:Ruby 83.9%Language:HTML 11.8%Language:JavaScript 2.6%Language:CSS 1.7%