instance method
<=>
Ruby on Rails 4.0.13
Since v4.0.13Signature
==(other)
Equivalent to String#<=>.
class BlogPost extend ActiveModel::Naming end BlogPost.model_name <=> 'BlogPost' # => 0 BlogPost.model_name <=> 'Blog' # => 1 BlogPost.model_name <=> 'BlogPosts' # => -1
Source
# File activemodel/lib/active_model/naming.rb, line 46
Defined in activemodel/lib/active_model/naming.rb line 46
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Name