Flowdock
method

!~

Importance_1
v4.0.2 - Show latest stable - 0 notes - Class: ActiveModel::Name
!~ public

Equivalent to String#!~. Match the class name against the given regexp. Returns true if there is no match, otherwise false.

class BlogPost
  extend ActiveModel::Naming
end

BlogPost.model_name !~ /Post/ # => false
BlogPost.model_name !~ /\d/   # => true
Show source
Register or log in to add new notes.