instance method []

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

[](path)

No documentation comment.

Parameters

path req
Source
# File actionpack/lib/action_view/reloadable_template.rb, line 20
      def [](path)
        if found_template = @paths[path]
          begin
            found_template.reset_cache_if_stale!
          rescue TemplateDeleted
            unregister_template(found_template)
            self[path]
          end
        else
          load_all_templates_from_dir(templates_dir_from_path(path))
          # don't ever hand out a template without running a stale check
          (new_template = @paths[path]) && new_template.reset_cache_if_stale!
        end
      end

Defined in actionpack/lib/action_view/reloadable_template.rb line 20 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::ReloadableTemplate::ReloadablePath

Type at least 2 characters to search.

↑↓ navigate · open · esc close