In ruby, the bang (!) symbol is used as a convention for methods.
The general rule of thumb is use bang(!) when the method will modify its argument(s).
Refer to the following extract from the book, 'the well grounded rubyists'. It has a very clear illustration.
Here's another article which speaks on when to use ! in rails.
Here's another article which speaks on when to use ! in rails.