class method
self.base_name
Ruby on Rails 4.1.16
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 280
def self.base_name
@base_name ||= begin
if base = name.to_s.split('::').first
base.underscore
end
end
end
Defined in railties/lib/rails/generators/base.rb line 280
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Base