edge badge
Methods
C
D
N
Constants
EXPLICIT_DEPENDENCY = /# Template Dependency: (\S+)/
 
RENDER_DEPENDENCY = / render\s* # render, followed by optional whitespace \(? # start an optional parenthesis for the render call (partial:|:partial\s+=>)?\s* # naming the partial, used with collection -- 1st capture ([@a-z"'][@\w\/\."']+) # the template name itself -- 2nd capture /x
 

Matches:

render partial: "comments/comment", collection: commentable.comments
render "comments/comments"
render 'comments/comments'
render('comments/comments')

render(@topic)         => render("topics/topic")
render(topics)         => render("topics/topic")
render(message.topics) => render("topics/topic")
Class Public methods
call(name, template)
# File actionview/lib/action_view/dependency_tracker.rb, line 45
def self.call(name, template)
  new(name, template).dependencies
end
new(name, template)
# File actionview/lib/action_view/dependency_tracker.rb, line 49
def initialize(name, template)
  @name, @template = name, template
end
Instance Public methods
dependencies()
# File actionview/lib/action_view/dependency_tracker.rb, line 53
def dependencies
  render_dependencies + explicit_dependencies
end