Module: Tokamak::Hook::Rails::Rails3Adapter

Defined in:
lib/tokamak/hook/rails.rb

Instance Method Summary collapse

Instance Method Details

#_pick_partial_template(path) ⇒ Object

:nodoc:



21
22
23
24
25
26
27
28
29
30
# File 'lib/tokamak/hook/rails.rb', line 21

def _pick_partial_template(path) #:nodoc:
  return path unless path.is_a?(String)
  prefix = controller_path unless path.include?(?/)
  find_template(path, prefix, true).instance_eval do
    unless respond_to?(:path)
      def path; virtual_path end
    end
    self
  end
end