class method
self.base_name
Ruby on Rails 7.0.10
Since v3.0.20Signature
self.base_name()
Sets the base_name taking into account the current class namespace.
Source
# File railties/lib/rails/generators/base.rb, line 326
def self.base_name # :doc:
@base_name ||= if base = name.to_s.split("::").first
base.underscore
end
end
Defined in railties/lib/rails/generators/base.rb line 326
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Base