class method
self.inherited
Ruby on Rails 3.0.20
Since v3.0.20Signature
self.inherited(base)
No documentation comment.
Parameters
-
basereq
Source
# File railties/lib/rails/engine.rb, line 99
def inherited(base)
unless base.abstract_railtie?
base.called_from = begin
# Remove the line number from backtraces making sure we don't leave anything behind
call_stack = caller.map { |p| p.split(':')[0..-2].join(':') }
File.dirname(call_stack.detect { |p| p !~ %r[railties[\w\-\.]*/lib/rails|rack[\w\-\.]*/lib/rack] })
end
end
super
end
Defined in railties/lib/rails/engine.rb line 99
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Engine