Class: InheritedResourcesViews::ActionView::PathSet

Inherits:
ActionView::PathSet
  • Object
show all
Defined in:
lib/inherited_resources_views/action_view.rb

Instance Method Summary collapse

Instance Method Details

#find(path, prefix = nil, partial = false, details = {}, key = nil) ⇒ Object



12
13
14
15
16
17
# File 'lib/inherited_resources_views/action_view.rb', line 12

def find(path, prefix = nil, partial = false, details = {}, key = nil)
  super
rescue ::ActionView::MissingTemplate
  prefix.to_s.sub!(/[\w]+$/, "inherited_resources")
  super
end

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



19
20
21
22
23
24
# File 'lib/inherited_resources_views/action_view.rb', line 19

def find_template(original_template_path, format = nil, html_fallback = true)
  super
rescue ::ActionView::MissingTemplate
  original_template_path.sub!(/^[\w]+/, "inherited_resources")
  super
end