Module: Vogue::PartialLocator
- Defined in:
- lib/vogue/partial_locator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 |
# File 'lib/vogue/partial_locator.rb', line 4 def self.included(base) base.module_eval do alias_method_chain :_pick_partial_template, :vogue end end |
Instance Method Details
#_pick_partial_template_with_vogue(partial_path) ⇒ Object
:nodoc:
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/vogue/partial_locator.rb', line 10 def _pick_partial_template_with_vogue(partial_path) #:nodoc: _pick_partial_template_without_vogue(partial_path) rescue ActionView::MissingTemplate raise if !controller.respond_to?(:vogue_data) raise if controller.nil? || controller.vogue_data[:root].blank? scaffold_paths = view_paths.class.new scaffold_paths.unshift(controller.vogue_data[:root]) scaffold_paths.find_template("_#{partial_path}", self.template_format) end |