dmail bulk update request errors to admin

This commit is contained in:
r888888888
2015-04-21 18:39:42 -07:00
parent 2016feeb28
commit 6ff02c653d
4 changed files with 40 additions and 6 deletions

View File

@@ -6,28 +6,28 @@ module BulkUpdateRequestsHelper
arg1_count = Tag.find_by_name(arg1).try(:post_count).to_i
arg2_count = Tag.find_by_name(arg2).try(:post_count).to_i
"create_alias " + link_to(arg1, posts_path(:tags => arg1)) + " (#{arg1_count}) -> " + link_to(arg2, posts_path(:tags => arg2)) + " (#{arg2_count})"
"create alias " + link_to(arg1, posts_path(:tags => arg1)) + " (#{arg1_count}) -> " + link_to(arg2, posts_path(:tags => arg2)) + " (#{arg2_count})"
when :create_implication
arg1_count = Tag.find_by_name(arg1).try(:post_count).to_i
arg2_count = Tag.find_by_name(arg2).try(:post_count).to_i
"create_implication " + link_to(arg1, posts_path(:tags => arg1)) + " (#{arg1_count}) -> " + link_to(arg2, posts_path(:tags => arg2)) + " (#{arg2_count})"
"create implication " + link_to(arg1, posts_path(:tags => arg1)) + " (#{arg1_count}) -> " + link_to(arg2, posts_path(:tags => arg2)) + " (#{arg2_count})"
when :remove_alias
arg1_count = Tag.find_by_name(arg1).try(:post_count).to_i
arg2_count = Tag.find_by_name(arg2).try(:post_count).to_i
"remove_alias " + link_to(arg1, posts_path(:tags => arg1)) + " (#{arg1_count}) -> " + link_to(arg2, posts_path(:tags => arg2)) + " (#{arg2_count})"
"remove alias " + link_to(arg1, posts_path(:tags => arg1)) + " (#{arg1_count}) -> " + link_to(arg2, posts_path(:tags => arg2)) + " (#{arg2_count})"
when :remove_implication
arg1_count = Tag.find_by_name(arg1).try(:post_count).to_i
arg2_count = Tag.find_by_name(arg2).try(:post_count).to_i
"remove_implication " + link_to(arg1, posts_path(:tags => arg1)) + " (#{arg1_count}) -> " + link_to(arg2, posts_path(:tags => arg2)) + " (#{arg2_count})"
"remove implication " + link_to(arg1, posts_path(:tags => arg1)) + " (#{arg1_count}) -> " + link_to(arg2, posts_path(:tags => arg2)) + " (#{arg2_count})"
when :mass_update
"mass_update " + link_to(arg1, posts_path(:tags => arg1)) + " -> " + link_to(arg2, posts_path(:tags => arg2))
"mass update " + link_to(arg1, posts_path(:tags => arg1)) + " -> " + link_to(arg2, posts_path(:tags => arg2))
end
end.join("\n")