Permalink
Browse files

Refine indexing status page

  • Loading branch information...
1 parent dfb9be5 commit 15a2fe11ab9253c9bcd277709d3be66b1242f6a4 @rwdaigle committed Dec 10, 2012
Showing with 9 additions and 7 deletions.
  1. +1 −2 Procfile
  2. +2 −2 app/models/user.rb
  3. +6 −3 app/views/gists/status.html.haml
View
@@ -1,3 +1,2 @@
web: bundle exec thin start -p $PORT
-worker: bundle exec rake gisted:work --trace
-kanshi: bundle exec kanshi
+worker: bundle exec rake gisted:work --trace
View
@@ -1,6 +1,6 @@
class User < ActiveRecord::Base
- attr_accessible :gh_id, :gh_email, :gh_name, :gh_avatar_url, :gh_oauth_token, :gh_url, :gh_username, :gh_auth_active
+ attr_accessible :gh_id, :gh_email, :gh_name, :gh_avatar_url, :gh_oauth_token, :gh_url, :gh_username, :gh_auth_active, :notify_comments
has_many :gists, :dependent => :destroy
has_many :files, :through => :gists
@@ -21,7 +21,7 @@ def authenticate(auth)
existing_user.update_attributes(attributes)
existing_user
else
- new_user = User.create(attributes)
+ new_user = User.create(attributes.merge(:notify_comments => true))
log({ns: self, fn: __method__, measure: true, at: 'user-created'}, new_user)
new_user
end
@@ -2,10 +2,13 @@
Gisted
.topsearch.command-bar-activated
- = "Indexing #{current_user.gists_count} gists and #{current_user.files_count} files..."
+ - if(current_user.gists_count > 0)
+ = "Indexing #{current_user.gists_count} gists and #{current_user.files_count} files..."
+ - else
+ Fetching gist metadata. One moment please...
- if current_user.indexed?
= link_to("done.", search_gists_path)
- Re-indexing will automatically occur.
+ Re-indexing will automatically occur in the future on gist updates.
/ %p
/ = link_to "Go to gist search", search_gists_path
@@ -24,5 +27,5 @@
$(function() {
setTimeout(function() {
location = "#{search_gists_path}";
- }, 4000);
+ }, 5000);
})

0 comments on commit 15a2fe1

Please sign in to comment.