Skip to content

apneadiving/rails-conf-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

See presentation

About

Rails conf workshop playground

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published