1
2
3
4
if @events != nil
  @events.each do |event|
    if @recurrents != nil
...

Ruby superfluous if statements

by ttdavett.myopenid.com, August 10, 2008 22:51, 4 refactorings, tagged with ruby, rails, if, else

I'm pretty sure theres a be...

F677fa685a2cfe8aff31f161062db3d3 Talk
1
2
3

<%= link_to image_tag("go_back.png"), user_path(@user) %><%= link_to 'Go Back', user_path(@user) %>

Ruby link_to with an image_tag a...

by ttdavett.myopenid.com, August 06, 2008 08:10, 6 refactorings, tagged with link_to rails ruby image_tag

I have two links side by si...

F677fa685a2cfe8aff31f161062db3d3 Talk
1
2
3
4
    event_times = events.collect { |event| event.date.strftime("%I:%M %p") }
    
    times.each do |time|
...

Ruby On two for loops cleanup?

by ttdavett.myopenid.com, August 01, 2008 08:50

This code doesnt seem to wo...

F677fa685a2cfe8aff31f161062db3d3 Talk

Ruby On two for loops cleanup?

by ttdavett.myopenid.com, July 31, 2008 04:27

This does not work, the da...

F677fa685a2cfe8aff31f161062db3d3 Talk
1
2
3
4
    times.each do |time|
      events.each do |event|
        if time.strftime("%I:%M %p") == event.datetime.strftime("%I:%M %p")
...

Ruby two for loops cleanup?

by ttdavett.myopenid.com, July 31, 2008 00:11, 7 refactorings, tagged with rails, ruby, array, hash

times is an array of dateti...

F677fa685a2cfe8aff31f161062db3d3 Talk