1 2 3
def extract source, number, attribute (0..(number-1)).inject(Array.new) do |result, index| ...
Ruby On Think this needs a loop
by Jason Dew,
September 06, 2008 20:21
Ruby On cleaner way to limit result...
by Jason Dew,
July 15, 2008 00:36
Stream parsing might be som...
1 2 3 4
class Highlighter def initialize(keywords, prefix='*', suffix='*', delimiter=' ') ...
Ruby On Rubyize this : 5th edition
by Jason Dew,
January 03, 2008 17:24
i purposely wrote this with...
Ruby On Creating an alphabetic for ...
by Jason Dew,
December 30, 2007 20:45
I did leave out a piece (th...
1 2 3
LETTERS = ('A'..'Z').entries + ['#'] ...
Ruby On Creating an alphabetic for ...
by Jason Dew,
December 30, 2007 19:22
Apologies, I wrote this cod...
1 2 3
def list_for_blogentries(user) ...
Ruby On Refactor my blog item helper
by Jason Dew,
December 19, 2007 18:46
I didn't consider sorting i...
1 2 3
def list_for_blogentries(user) ...
Ruby On Refactor my blog item helper
by Jason Dew,
December 19, 2007 13:28
See if this works for you. ...
1 2 3
LETTERS = ('A'..'Z').entries + ['#'] ...
Ruby On Creating an alphabetic for ...
by Jason Dew,
December 17, 2007 00:25
I don't really like having ...
1 2 3
class Array ...
Ruby On split_in_groups instead of ...
by Jason Dew,
November 28, 2007 17:23
here's my first shot at it
1 2 3 4
def replace_keywords(keywords, text) keywords.each do |keyword, replacement| text.gsub! "\{#{keyword}\}", replacement ...
Ruby On Simple Text Replacement
by Jason Dew,
November 16, 2007 13:16
I agree with Scott about ma...
1 2 3 4
def replace_keywords(keywords, text) keywords.each do |keyword, replacement| text.send( 'gsub!', "\{#{keyword}\}", "#{replacement}" ) ...
1 2 3 4
def add_associated_link(model_name, label = "Add another") link_to_function label do |page| page.insert_html :bottom, model_name.pluralize, :partial => model_name, :object => model_name.camelize.constantize.new ...
Ruby On Combining add/remove links
by Jason Dew,
October 16, 2007 23:25
I don't see where you use t...


How about this?