instance method
module_namespacing
Ruby on Rails 3.1.12
Since v3.1.12 Last seen in v4.2.9Signature
module_namespacing(&block)
Wrap block with namespace of current application if namespace exists and is not skipped
Parameters
-
blockblock
Source
# File railties/lib/rails/generators/named_base.rb, line 38
def module_namespacing(&block)
content = capture(&block)
content = wrap_with_namespace(content) if namespaced?
concat(content)
end
Defined in railties/lib/rails/generators/named_base.rb line 38
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::NamedBase