arr = []
b={:a => "option1", :b => "option2"}
b.each_pair{ |key,value| arr << "#{key}=#{value}" }
...

Ruby HTML query string

by jalapinto.myopenid.com, April 29, 2010 00:04, 5 refactorings, tagged with ruby, html, query, params

Trying to create the query ...

55502f40dc8b7c769880b10874abc9d0 Talk
def build_criteria(data_cols, i)
     filterHTML = ''
     typeObjects = ''
...

Ruby Helper Method could be more...

by Danny Peck, April 23, 2009 20:53, 5 refactorings, tagged with ruby, html, content_tag, select_tag

Any help is appreciated.

8f5553306c2cf7f4b14153f6117f8e9b Talk
<%= (@post.category ? @post.category.name : '') + ' ' + link_to(@post.title, post_path(@post)) %>

Ruby Handling nil object

by macournoyer, November 14, 2007 02:07, 13 refactorings, tagged with rails, html

@post.category can be nil, ...

Bfec5f7d1a4aaafc5a2451be8c42d26a Talk