Map and to_proc to easier capitalize array of strings

["auckland", "christchurch", "wellington", "hamilton", "tauranga", "dunedin", "palmerston north", "hastings", "nelson", "napier", "rotorua", "new plymouth", "whangarei", "invercargill", "wanganui", "gisborne"].map(&:capitalize)

Posted on April 1, 2009 at 10:17 am by Jordan Carter · Permalink · 2 Comments
In: Uncategorized · Tagged with: , , , ,

Ruby on Rails – Easier enumerations (Select, Collect, Map) using Ampersand

a = [] # setup array 0.upto(100) do #just make up some array a << rand(1000) end s = a.in_groups_of(6,false) # make it an array of arrays (so we can use the sort method on each element of the outer array) s.collect(&:sort) #sort each array inside the outer array in one easy step What are […]

Posted on March 31, 2009 at 10:31 am by Jordan Carter · Permalink · One Comment
In: Uncategorized · Tagged with: , , , ,

Facebook Connect – send feed dialog to profile

A quick Facebook Connect tutorial showing how to add user login and sending a feed dialog to the FB profile.

Posted on March 16, 2009 at 11:05 am by Jordan Carter · Permalink · Leave a comment
In: Uncategorized · Tagged with: , , , ,

Objective Resource to the rescue

So I’m working on a top secret military iPhone app to be deployed in a top secret location… Anyway, it needs to interact with a rails app.  Googled around, found objective resource which is a great objc port of Active Resource. Now, I needed to man handle it a bit for what I want it […]

Posted on February 17, 2009 at 9:12 am by Jordan Carter · Permalink · Leave a comment
In: Iphone · Tagged with: , , , ,