I'm using Rails3, devise, and acts_as_taggable_on.
In user's edit page I added tag input box for each user.
But user might input something like this
Word1, Word2. Word3
They should be separated by ',(comma)'
So I want to check and replace particular characters to exclude.
For that, I added this to my User model
before_update :check_taglist
def check_taglist
tag_list = params[:tag_list].gsub(/[ ]+/," ")
tag_list = params[:tag_list].gsub(/[.]+/,",")
end
But what it says error now:(
undefined local variable or method `params' for
How can I fix this???