improved error message for posts

This commit is contained in:
albert
2013-02-20 17:08:51 -05:00
parent b03e889cdd
commit 62ccdf97d4
2 changed files with 13 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ class PostsController < ApplicationController
respond_to :html, :xml, :json
rescue_from PostSets::SearchError, :with => :search_error
rescue_from Post::SearchError, :with => :search_error
rescue_from Danbooru::Paginator::PaginationError, :with => :search_error
def index
@post_set = PostSets::Post.new(tag_query, params[:page], params[:limit])

View File

@@ -79,6 +79,18 @@ namespace :deploy do
end
end
namespace :nginx do
desc "Shut down Nginx"
task :stop do
sudo "for i in `pgrep -f nginx` ; do kill -SIGTERM $i ; done"
end
desc "Start Nginx"
task :stop do
sudo "/etc/init.d/nginx start"
end
end
desc "Precompiles assets"
task :precompile_assets do
run "cd #{current_path}; bundle exec rake assets:precompile"