Archive for the ‘Uncategorized’ Category

Facebook Connect Checklist – What to not overlook

What do you need to consider before adding Facebook Connect to your website? Here I go over some things I encountered.

Posted on April 5, 2009 at 4:24 pm by Jordan Carter · Permalink · 2 Comments
In: Uncategorized · Tagged with: ,

Run Single / One Functional Ruby on Rails Test

From the root rails directory you can run the following to run ONLY the page_controller functional test ruby -I lib:test test/functional/page_controller_test.rb

Posted on April 2, 2009 at 9:45 am by Jordan Carter · Permalink · Leave a comment
In: Uncategorized · Tagged with: , , ,

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: , , , ,

Textmate Trick – quickly jump to function / method definition in file

To quickly jump to where a function or method is defined in your ruby file Shift + Apple/Command + T I say Apple/Command because people call that key by either of those names.

Posted on March 30, 2009 at 4:40 pm by Jordan Carter · Permalink · One Comment
In: Uncategorized · Tagged with: ,

What do I do? I live in New Zealand baby!

I work for Made From New Zealand and you can see my profile Jordan Daniel Carter over there too.  The website’s purpose is to promote New Zealand to the world through all digital means we have access to. We have a great team of people using the latest and greatest tools to get us there.  […]

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

Ruby trick – Save a sort for later, Reuse a sort block

Sort multiple arrays with a single block/proc

Posted on March 29, 2009 at 12:09 pm by Jordan Carter · Permalink · Leave a comment
In: Uncategorized · Tagged with: , , , ,

Textmate Trick – Execute one liners inline inside Textmate

Execute ruby within Textmate and get the result back in textmate!

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