In a model there is a field
validates :image_file_name, :format => { :with => %r{\\.(gif|jpg|jpeg|png)$}i
It looks pretty odd for me.
With %r, you could use any delimiters.
%r
You could use %r{} or %r[] or %r!! etc.
%r{}
%r[]
%r!!
The benefit of using other delimeters is that you don't need to escape the / used in normal regex literal.
/