def set_teams_members
if params[:fee][:number_of_teams].blank?
number_of_teams = params[:teams]
...
Ruby On Need to remove If else
by mischamolhoek.myopenid.com,
January 30, 2009 15:08
def convert_from_textile_to_s5(fin)
File.read('fin').scan(/h1\..[^\n]*\n(?:\*[^\n]*\n)*/m).map{|s| RedCloth.new(s).to_html}
end
Ruby On Converting Textile to S5
by mischamolhoek.myopenid.com,
January 13, 2009 09:41
i think this should do it...
puts Word.new('rdapepa epdemrtrfx,feyefryeemcprt,cn ct, zaaaxdam')
Ruby On Newb needs some cleanup
by mischamolhoek.myopenid.com,
December 24, 2008 08:02
@adam - your right, it was ...
require 'enumerable' brew = "rdadadroxmocpronogomocdmqzx" brew = brew.split(//); ...
Ruby On Newb needs some cleanup
by mischamolhoek.myopenid.com,
December 23, 2008 17:37
if you like oneliners.... :...
Ruby On very simple .srt resyncroniser
by mischamolhoek.myopenid.com,
December 23, 2008 08:24
that's about as short as it...
category_id = category_name[/category-(\d+)/,1]
Ruby On Ugly RegEx Accessor
by mischamolhoek.myopenid.com,
December 22, 2008 09:19
or do something like this
Ruby On Screen Scraping Google with...
by mischamolhoek.myopenid.com,
December 18, 2008 08:52
just a question: why use wa...
row_sum = row[1..-1].inject(0){|s, e| s+e}
Ruby On Conditionally deleting colu...
by mischamolhoek.myopenid.com,
December 18, 2008 08:35
for starters you can replac...
get '/:id.?:format?' do @vent = Vent.get(params[:id]) builder :show if params[:format] == xml ...
Ruby On Trying to condence 2 method...
by mischamolhoek.myopenid.com,
December 17, 2008 09:23
i would not use a case stat...
ternary cleans it up a bit