instance method
==
Ruby on Rails 4.2.9
Since v4.0.13Signature
==(other)
Equivalent to String#==. Returns true if the class name and other are equal, otherwise false.
class BlogPost extend ActiveModel::Naming end BlogPost.model_name == 'BlogPost' # => true BlogPost.model_name == 'Blog Post' # => false
Source
# File activemodel/lib/active_model/naming.rb, line 16
Defined in activemodel/lib/active_model/naming.rb line 16
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Name