fix for ads
This commit is contained in:
@@ -16,6 +16,10 @@ class CommentsController < ApplicationController
|
||||
def search
|
||||
end
|
||||
|
||||
def new
|
||||
redirect_to comments_path
|
||||
end
|
||||
|
||||
def update
|
||||
@comment = Comment.find(params[:id])
|
||||
check_privilege(@comment)
|
||||
|
||||
@@ -14,7 +14,7 @@ class PostsController < ApplicationController
|
||||
rescue ::ActiveRecord::StatementInvalid => e
|
||||
if e.to_s =~ /statement timeout/
|
||||
@error_message = "The database timed out running your query. Try a simpler query that returns fewer results."
|
||||
render :action => "error"
|
||||
render :template => "static/error", :status => 500
|
||||
else
|
||||
raise
|
||||
end
|
||||
@@ -34,7 +34,7 @@ class PostsController < ApplicationController
|
||||
format.html do
|
||||
if @post.errors.any?
|
||||
@error_message = @post.errors.full_messages.join("; ")
|
||||
render :action => "error"
|
||||
render :template => "static/error", :status => 500
|
||||
else
|
||||
redirect_to post_path(@post)
|
||||
end
|
||||
|
||||
@@ -13,7 +13,6 @@ module AdvertisementsHelper
|
||||
:height => @advertisement.height
|
||||
),
|
||||
advertisement_hits_path(:advertisement_id => @advertisement.id),
|
||||
:remote => true,
|
||||
:method => :post
|
||||
),
|
||||
:style => "margin-bottom: 1em;"
|
||||
|
||||
@@ -201,7 +201,9 @@ Danbooru::Application.routes.draw do
|
||||
match "/artist/show" => redirect {|params, req| "/artists?name=#{CGI::escape(req.params[:name])}"}
|
||||
match "/artist/history/:id" => redirect("/artist_versions?search[artist_id]=%{id}")
|
||||
match "/artist/update/:id" => redirect("/artists/%{id}")
|
||||
match "/artist/destroy/:id" => redirect("/artists/%{id}")
|
||||
match "/artist/recent_changes" => redirect("/artist_versions")
|
||||
match "/artist/create" => redirect("/artists")
|
||||
|
||||
match "/comment" => redirect {|params, req| "/comments?page=#{req.params[:page]}"}
|
||||
match "/comment/index" => redirect {|params, req| "/comments?page=#{req.params[:page]}"}
|
||||
|
||||
Reference in New Issue
Block a user