Skip to content

Commit

Permalink
Minor bugfix in the random news function
Browse files Browse the repository at this point in the history
  • Loading branch information
fcambus committed Jun 23, 2013
1 parent f2af18a commit 0a28b64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def render_comment_subthread(comment,sep="")

get '/random' do
counter = $r.get("news.count")
random = 1 + rand(counter)
random = 1 + rand(counter.to_i)

if $r.exists("news:#{random}")
redirect "/news/#{random}"
Expand Down

0 comments on commit 0a28b64

Please sign in to comment.