improved error message for posts
This commit is contained in:
@@ -4,6 +4,7 @@ class PostsController < ApplicationController
|
|||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
rescue_from PostSets::SearchError, :with => :search_error
|
rescue_from PostSets::SearchError, :with => :search_error
|
||||||
rescue_from Post::SearchError, :with => :search_error
|
rescue_from Post::SearchError, :with => :search_error
|
||||||
|
rescue_from Danbooru::Paginator::PaginationError, :with => :search_error
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@post_set = PostSets::Post.new(tag_query, params[:page], params[:limit])
|
@post_set = PostSets::Post.new(tag_query, params[:page], params[:limit])
|
||||||
|
|||||||
@@ -79,6 +79,18 @@ namespace :deploy do
|
|||||||
end
|
end
|
||||||
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"
|
desc "Precompiles assets"
|
||||||
task :precompile_assets do
|
task :precompile_assets do
|
||||||
run "cd #{current_path}; bundle exec rake assets:precompile"
|
run "cd #{current_path}; bundle exec rake assets:precompile"
|
||||||
|
|||||||
Reference in New Issue
Block a user