instance method
<=>
Ruby on Rails edge
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 53
Defined in activemodel/lib/active_model/naming.rb line 53
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Name