thoughtbot/croutons

path_helpers are not available in my trail

Closed this issue · 1 comments

class BreadcrumbTrail < Croutons::BreadcrumbTrail

def internal_vaults_index
    home
    breadcrumb "Vaults", internal_vaults_path
  end

  def internal_vaults_new
    internal_vaults_index
    breadcrumb "Create a new Vault"
  end

  def method_missing(*m)
    p "breadcrumb_trail.rb: missing_method: #{m.first}"
  end

end

results in

"breadcrumb_trail.rb: missing_method: internal_vaults_path"
  Rendered breadcrumbs/_breadcrumbs.haml (Duration: 0.1ms | Allocations: 45)

<a href="breadcrumb_trail.rb: missing_method: internal_vaults_path">Vaults</a>

however, path_name is correct

rake routes | grep internal_vaults
internal_vaults GET                   /internal/vaults(.:format)          internal/vaults#index

lmao.
figured out in pull #9 that you guys use the method_missing to call the path helpers. i override it to see which one was missing. yikes :-)