From 425b6c6926350779f0da464d88255016b8143ffa Mon Sep 17 00:00:00 2001 From: andrew Date: Sun, 23 Nov 2008 01:44:32 -0600 Subject: [PATCH] better sorting and center little facebook images --- binaryattraction_facebooker.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/binaryattraction_facebooker.rb b/binaryattraction_facebooker.rb index 0bf1ab9..fd3011c 100755 --- a/binaryattraction_facebooker.rb +++ b/binaryattraction_facebooker.rb @@ -86,7 +86,7 @@ end # most oneable photos post '/hall_of_fame' do - @top_oneness = Photo.find :all, :order => 'oneness DESC, id DESC', :limit => 10, :conditions => 'oneness > 0' + @top_oneness = Photo.find :all, :order => 'oneness DESC, votes_count DESC, id DESC', :limit => 10, :conditions => 'oneness > 0' haml :hall_of_fame end @@ -101,7 +101,7 @@ post '/vote' do @vote.errors.each_full { |m| log.info "* #{m}" } end end - @photo = Photo.next_available_votable_photo ba_user + @photo = Photo.next_available_votable_photo ba_user, true haml :vote end @@ -296,6 +296,10 @@ __END__ border: 1px solid #c17d11 padding: 3px 10px margin-bottom: 10px + img + display: block + margin-left: auto + margin-right: auto p text-align: center #vote_container