I want to validate a string before saving, but I need a custom method
because I want to change stuff in the string.
I need to remove all whitespaces (front, back, inside) of
How I can do it, @movie is the model to save.
# I think I put my code here to modify filename
secondly, after I modify my string I want to verify if it contains only
I'm not familiar with regular expression is it:
errors.add("filename", "has invalid format") unless filename =~