app/models/user.rb
def commit_blacklists
      if @blacklisted_tags
        user_blacklisted_tags.clear

        @blacklisted_tags.scan(/[^\r\n]+/).each do |tags|
          user_blacklisted_tags.create(:tags => tags)
        end
      end
    end
# TODO: I don't see the advantage of normalizing these. Since commas are illegal
# characters in tags, they can be used to separate lines (with whitespace separating
# tags). Denormalizing this into a field in users would save a SQL query.
I don't see the advantage of normalizing these. Since commas are illegal
characters in tags, they can be used to separate lines (with whitespace separating
tags). Denormalizing this into a field in users would save a SQL query.
I don ' t see the advantage of normalizing these . Since commas are illegal characters in tags they can be used to separate lines ( with whitespace separating tags ) . Denormalizing this into a field in users would save a SQL query .
def commit_blacklists
      if @blacklisted_tags
        user_blacklisted_tags.clear
        @blacklisted_tags.scan(/[^\r\n]+/).each do |tags|
          user_blacklisted_tags.create(:tags => tags)
        end
      end
    end
def commit_blacklists if @blacklisted_tags user_blacklisted_tags . clear @blacklisted_tags . scan ( / [^ \r \n ]+ / ) . each do | tags | user_blacklisted_tags . create ( :tags => tags ) end end end
TODO: I don't see the advantage of normalizing these.
TODO : I don ' t see the advantage of normalizing these .