class method
self.base_name
Ruby on Rails 3.1.12
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 283
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 283
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Base