Skip to content
Browse files

relax some warnings

  • Loading branch information...
1 parent 087d4b8 commit 684681d0f83cb0b304da53303a085c3a7da29500 @rdp committed Aug 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/product.rb
View
4 app/models/product.rb
@@ -244,7 +244,7 @@ def find_problems expensive=true# true until I can figure out what in the world
#topic_tags = Tag.find_by_name( "Topics", :include => :children).children
#instrument_tags = Tag.find_by_name("Instrumental", :include => :children).children
for topic_tag in Tag.all#topic_tags + instrument_tags
- next if topic_tag.name.in? ['Christ', 'Work', 'Music', 'Piano', 'Original'] # too common false positives :)
+ next if topic_tag.name.in? ['SA', 'Christ', 'Work', 'Music', 'Piano', 'Original'] # too common false positives :)
for topic_tag_name in topic_tag.name.split('/')
topic_tag_name.strip!
bare_name_reg = Regexp.new(Regexp.escape(topic_tag_name), Regexp::IGNORECASE)
@@ -273,7 +273,7 @@ def find_problems expensive=true# true until I can figure out what in the world
problems << "probably not a unique product code please update #{count}"
end
if self.hymn_tag && self.name != self.hymn_tag.name && (self.hymn_tags.length == 1) && self.name !~ /original/i && self.hymn_tag.name !~ /theme/i && !self.name.contain?(hymn_tag.name)
- if !self.hymn_tag.name.include?('/') && !self.hymn_tag.name.include?('(') && (self.hymn_tags.length == 1)
+ if !self.hymn_tag.name.include?('/') && !self.hymn_tag.name.include?('(') && (self.hymn_tags.length == 1) && !self.description.include?(self.hymn_tag.name)
problems << "possibly mispelled [doesnt match hymn--might be expected/capitalization]--#{self.hymn_tag.name}"
end
end

0 comments on commit 684681d

Please sign in to comment.
Something went wrong with that request. Please try again.