1 2 3 4
var message = "" if (XMLHttpRequest.responseText.length > 0) message = jQuery.parseJSON(XMLHttpRequest.responseText).error ...
JavaScript Double 'if'
1 2 3 4
def is_pos_activation? if session[:pos_activation] block_given? ? yield : true ...
Ruby better way?
i like this code, but exist...
1 2 3 4
#insert new record if it dosent already exist if !dbh.select_one('SELECT Salenm FROM Auctions Where Salenm LIKE "%' + c.attributes["href"][/....$/] + '%"') dbh.do("INSERT INTO Auctions (Salenm, Date, Location) VALUES (?, ?, 1)", ...
Ruby Insert new record if it dos...
by bain19.myopenid.com,
June 24, 2010 04:33,
1 refactoring, tagged with if, mysql, select, bain19, sql injection
Is there a safer way to-do ...
1 2 3 4
if current_user @var = current_user.search_terms.build else ...
Ruby if else more elegant
is a better way to do this?
1 2 3 4
y_max = 10 arr_data.each do |arr| ...
Ruby 2D array manipulation
by asmega.myopenid.com,
September 12, 2009 13:10,
1 refactoring, tagged with ruby, array, each, iterate, if, break, first
an array within array itera...
1 2 3 4
stuff.each do |name| name = name.downcase #size ...
Ruby ungliness and long too
by uberholden.myopenid.com,
September 10, 2009 13:15,
6 refactorings, tagged with case, ruby, if else, if, rails
any ideas on making this mo...
1 2 3 4
if @events != nil @events.each do |event| if @recurrents != nil ...
Ruby superfluous if statements
I'm pretty sure theres a be...
How to make this code looks...