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.
In: Uncategorized · Tagged with: facebook connect, Implement
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
In: Uncategorized · Tagged with: Functional, one, single, Test
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)
In: Uncategorized · Tagged with: blocks, Proc, Rails, Ruby, to_proc
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 […]
In: Uncategorized · Tagged with: arrays, collections, enumerations, Rails, Ruby
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.
In: Uncategorized · Tagged with: Shortcut, Textmate Trick
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. […]
In: Uncategorized · Tagged with: New Zealand, Web Development, Wellington
Ruby trick – Save a sort for later, Reuse a sort block
Sort multiple arrays with a single block/proc
In: Uncategorized · Tagged with: Block, Proc, Reuse, Ruby, Sort
Textmate Trick – Execute one liners inline inside Textmate
Execute ruby within Textmate and get the result back in textmate!
In: Uncategorized · Tagged with: execute ruby, Textmate Trick