Posts Tagged ‘ patterns ’

MongoMapper 0.7: Identity Map

2010/02/21
By John Nunemaker
MongoMapper 0.7: Identity Map

In which I explain that a pattern learned is a query saved.


Read more »

Tags: ,
Posted in Publishers, Rails Tips | View Comments

Sending email: Controllers versus Models

2009/11/16
By Robby Russell
Sending email: Controllers versus Models

While reviewing some code recently, I came across controller code that resembled the following.

if @customer.save
  CustomerMailer.deliver_welcome_message(@customer)
  flash = "Your account has been successfully created. We've sent you a welcome letter with..."
  redirect_to dashboard_path
else
  ...
end

Fairly typical Rails code. Nothing alarming here, but I wanted to evaluate the call to the mailer...
Read more »

Tags: , , , , , , ,
Posted in Publishers, Robby on Rails | View Comments

Patterns Are Not Scary: Method Missing Proxy

2009/08/06
By john
Patterns Are Not Scary: Method Missing Proxy

In which I show how to create a method missing proxy and provide some example uses in the wild.


Read more »

Tags: ,
Posted in Publishers, Rails Tips | View Comments

Flash Message Conductor

2008/08/29
By Robby Russell
Flash Message Conductor

Do you find yourself copying and pasting the same code from Rails application-to-application as new projects start? Our team has a handful of projects in development right now and we notice that some of these reusable components tend to get out of sync when we bounce between projects. So, we’re making an effort to...
Read more »

Tags: , , , , , , , , , , ,
Posted in Publishers, Robby on Rails | View Comments