!~(regexp)
Instance Public methods
Equivalent to String#!~
. Match the class name against the
given regexp. Returns true
if there is no match, otherwise
false
.
1 2 3 4 5 6 | class BlogPost extend ActiveModel::Naming end BlogPost.model_name !~ /Post/ # => false BlogPost.model_name !~ /\d/ # => true |
Please login to continue.