==

==(other)
Instance Public methods

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
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.