Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Change the message for removing all tags from mappings #210

Merged
merged 1 commit into from

3 participants

@issyl0
Collaborator
  • 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.
@issyl0 issyl0 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.
4078c83
@issyl0 issyl0 commented on the diff
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}"
@issyl0 Collaborator
issyl0 added a note

The reasoning behind the spaces between #{ and 'mapping' is that I followed the example of the original line. Should I remove the spaces to make it look neater?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@fofr
Collaborator

Looks good to me :thumbsup:

@issyl0 issyl0 closed this
@issyl0 issyl0 reopened this
@issyl0
Collaborator

Oops. Accidentally closed. Now reopened. And :+1: @fofr.

@jamiecobbett jamiecobbett merged commit 68206bc into master

1 check passed

Details default "Build #183 succeeded on Jenkins"
@jamiecobbett jamiecobbett deleted the fix_all_tags_removed_message branch
@issyl0
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 7, 2014
  1. @issyl0

    Change the message for removing all tags from mappings

    issyl0 authored
    - 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.
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/models/view/mappings/bulk_tagger.rb
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}"
@issyl0 Collaborator
issyl0 added a note

The reasoning behind the spaces between #{ and 'mapping' is that I followed the example of the original line. Should I remove the spaces to make it look neater?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ end
end
private
Something went wrong with that request. Please try again.