Skip to content

Instantly share code, notes, and snippets.

View keithpitt's full-sized avatar
🍔
This is not a burger

Keith Pitt keithpitt

🍔
This is not a burger
View GitHub Profile
@keithpitt
keithpitt / 01-package.json
Created December 5, 2011 06:56 — forked from SlexAxton/01-package.json
Compiling Sproutcore Handlebars Templates on the Server
{ "description" : "Sproutcore Handlebars Precompiler"
, "version" : "0.1.0"
, "author" : "Alex Sexton <Alex.Sexton@bazaarvoice.com>"
, "engines" : ["node >=0.4.7"]
, "main" : "./lib/main"
, "dependencies": {
"handlebars": "1.0.x"
}
}
def merge_suppliers
@supplier_from = Supplier.find(params[:id])
begin
@supplier_to = Supplier.find(params[:supplier_id])
rescue ActiveRecord::RecordNotFound
flash[:error] = "#{t('object.supplier')} #{t('messages.not_found')}"
return redirect_to(manage_supplier_path(@supplier_from.id))
end