Class: ActionView::PathSet

Inherits:
Object show all
Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/generic_view_paths.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#active_scaffold_pathsObject

Returns the value of attribute active_scaffold_paths.



4
5
6
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/generic_view_paths.rb', line 4

def active_scaffold_paths
  @active_scaffold_paths
end

Instance Method Details

#find_template_with_active_scaffold(original_template_path, format = nil, html_fallback = true) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/generic_view_paths.rb', line 6

def find_template_with_active_scaffold(original_template_path, format = nil, html_fallback = true)
  begin
    find_template_without_active_scaffold(original_template_path, format, html_fallback)
  rescue MissingTemplate
    if active_scaffold_paths && original_template_path.include?('/')
      active_scaffold_paths.find_template_without_active_scaffold(original_template_path.split('/').last, format, html_fallback)
    else
      raise
    end
  end
end