Permalink
Browse files

Removing pry and refactoring

  • Loading branch information...
1 parent b0a71c1 commit 40fd00cf31801b6c69277e9f703626fb0afd40f7 @edmore committed May 22, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 peekaboo.rb
View
@@ -1,10 +1,9 @@
require 'sinatra'
require 'haml'
-require 'pry'
require 'redis'
set :haml, :format => :html5
-
+
redis = Redis.new
get "/" do
@@ -23,8 +22,7 @@
title = params[:question]
status = ""
unless title == ""
- redis.incr "question:id"
- question_id = redis.get("question:id")
+ question_id = redis.incr "question:id"
redis.rpush("questions", question_id)
redis.set("question:#{question_id}:title", params[:question])
status = :success

0 comments on commit 40fd00c

Please sign in to comment.