Skip to content

Instantly share code, notes, and snippets.

View cored's full-sized avatar
🐔
Debugging Everything

Rafael George cored

🐔
Debugging Everything
View GitHub Profile
@cored
cored / test_induced_design_damage.rb
Created June 25, 2021 17:01 — forked from dhh/test_induced_design_damage.rb
This is an extraction from Jim Weirich's "Decoupling from Rails" talk, which explained how to apply the hexagonal design pattern to make every layer of your application easily unit testable (without touching the database etc). It only seeks to extract a single method, the EmployeesController#create method, to illustrate the design damage that's …
# Original Rails controller and action
class EmployeesController < ApplicationController
def create
@employee = Employee.new(employee_params)
if @employee.save
redirect_to @employee, notice: "Employee #{@employee.name} created"
else
render :new
end
@cored
cored / Questions
Created July 12, 2011 13:33
Magma Rails Give-away
Day Job: Java developer
Open Source contribution (if any):
- Ticketmaster (http://ticketrb.com)
- Padrino Framework (http://padrinorb.com)
Tell me about your experience with Ruby/Rails:
I have 3 years of Ruby experience and 1 and a half with Rails.
How do you use GitHub:
Forking, reading code, contributing, managing my code and freelance work.
Favorite luchador(es): El Santo

Introduction

This is a port of the Askeet tutorial to Merb.

The challenge

The Merb advent calendar is a set of 24 tutorials. That's right, every day including week-ends, a new tutorial will be published. Each tutorial is meant to last less than one hour, and will be the occasion to see the ongoing development of a web 2.0 application, from A to Z. The resulting application will be put online, and the source code made open source. This application will be usable, interesting, useful, and fun.

Twenty-four times less than one hour equals less than a day, and we think that's exactly how long it takes for a developer to learn Merb. Every day, new features will be added to the application, and through these new features we'll show you how to take advantage of Merb's functionality as well as good practices in developing with Merb. Every day, you will realize how fast and efficient it is to develop a web app with Merb, and you will want to know more.