Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change the message for removing all tags from mappings

- The message reads: "Tags removed from num_x mappings".
- This is an alternative to "Tags a and b removed from num_x
  mappings", which I don't think could be done due to tag_list being
  blank at the time of saving when tags are deleted.
  • Loading branch information...
commit b15157b333934f6769f4b2bda29ea3c93da7dfcb 1 parent ae34f2d
@issyl0 issyl0 authored
Showing with 8 additions and 4 deletions.
  1. +5 −1 app/models/view/mappings/bulk_tagger.rb
  2. +3 −3 db/structure.sql
View
6 app/models/view/mappings/bulk_tagger.rb
@@ -48,7 +48,11 @@ def update!
def success_message
successes = mappings.count - @failure_ids.length
- "#{successes} #{ 'mapping'.pluralize(successes) } tagged “#{tag_list}"
+ if tag_list.blank?
+ "Tags removed from #{successes} #{ 'mapping'.pluralize(successes) }"
+ else
+ "#{successes} #{ 'mapping'.pluralize(successes) } tagged “#{tag_list}"
+ end
end
private
View
6 db/structure.sql
@@ -122,14 +122,14 @@ CREATE TABLE `schema_migrations` (
CREATE TABLE `sessions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `session_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
- `data` text COLLATE utf8_unicode_ci,
+ `session_id` varchar(255) NOT NULL,
+ `data` text,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `index_sessions_on_session_id` (`session_id`),
KEY `index_sessions_on_updated_at` (`updated_at`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sites` (
`id` int(11) NOT NULL AUTO_INCREMENT,
Please sign in to comment.
Something went wrong with that request. Please try again.