Skip to content

Instantly share code, notes, and snippets.

@arturo-c
Created October 29, 2013 18:14
Show Gist options
  • Save arturo-c/7219785 to your computer and use it in GitHub Desktop.
Save arturo-c/7219785 to your computer and use it in GitHub Desktop.
games_controller.rb
def index
@games.each do |game|
game.datetime = DateTime.parse(game.date + ' ' + game.time)
end
end
index.html.erb
@games.each do |game|
puts game.datetime.strftime("%m/%d/%Y at %I:%M%p")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment