merge master into autocomplete-aliased-tags

This commit is contained in:
Toks
2015-04-07 15:00:39 -04:00
15 changed files with 33 additions and 87 deletions

View File

@@ -35,7 +35,7 @@ class BulkUpdateRequestsController < ApplicationController
def destroy
if @bulk_update_request.editable?(CurrentUser.user)
@bulk_update_request.destroy
@bulk_update_request.reject!
flash[:notice] = "Bulk update request deleted"
respond_with(@bulk_update_request, :location => bulk_update_requests_path)
else

View File

@@ -7,11 +7,6 @@ class TagAliasesController < ApplicationController
respond_with(@tag_alias)
end
def new
@tag_alias = TagAlias.new(params[:tag_alias])
respond_with(@tag_alias)
end
def edit
@tag_alias = TagAlias.find(params[:id])
end
@@ -36,11 +31,6 @@ class TagAliasesController < ApplicationController
end
end
def create
@tag_alias = TagAlias.create(params[:tag_alias])
respond_with(@tag_alias, :location => tag_aliases_path(:search => {:id => @tag_alias.id}))
end
def destroy
@tag_alias = TagAlias.find(params[:id])
if @tag_alias.deletable_by?(CurrentUser.user)

View File

@@ -7,11 +7,6 @@ class TagImplicationsController < ApplicationController
respond_with(@tag_implication)
end
def new
@tag_implication = TagImplication.new
respond_with(@tag_implication)
end
def edit
@tag_implication = TagImplication.find(params[:id])
end
@@ -36,11 +31,6 @@ class TagImplicationsController < ApplicationController
end
end
def create
@tag_implication = TagImplication.create(params[:tag_implication])
respond_with(@tag_implication, :location => tag_implications_path(:search => {:id => @tag_implication.id}))
end
def destroy
@tag_implication = TagImplication.find(params[:id])
if @tag_implication.deletable_by?(CurrentUser.user)

View File

@@ -16,7 +16,11 @@ class UploadsController < ApplicationController
@normalized_url, headers = strategy.new(@normalized_url).rewrite(@normalized_url, headers)
end
@post = Post.where(source: [params[:url], @normalized_url]).first
if @normalized_url.nil?
@post = Post.where(source: params[:url]).first
else
@post = Post.where(source: [params[:url], @normalized_url]).first
end
begin
@source = Sources::Site.new(params[:url])