#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 mysql, if, select, bain19, sql injection
Is there a safer way to-do ...
if current_user
@var = current_user.search_terms.build
else
...
Ruby if else more elegant
is a better way to do this?
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, iterate, array, each, if, break, first
an array within array itera...
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 rails, ruby, if, case, if else
any ideas on making this mo...
if @events != nil
@events.each do |event|
if @recurrents != nil
...
Ruby superfluous if statements
I'm pretty sure theres a be...
i like this code, but exist...