Skip to content

breadcrumbs and CRUD #37

Closed
Closed
@Oublier

Description

@Oublier

First off; great gem!

I'm relatively new to Rails and Ruby so please forgive my ignorance. I'm using simple-navigation to render breadcrumbs. I having trouble specifically with crumbing for CRUD; specifically with SHOW and EDIT. I cant seem to get the path helpers to recognize the record ID for the notifications table.

Render line in app/views/layouts/application.html.erb


<%= render_navigation :renderer => :breadcrumbs, :join_with => " > " %>

navigation.rb:


SimpleNavigation::Configuration.run do |navigation|

navigation.items do |primary|

primary.item :home, 'Home', '/' do |home|
  home.item :notification, 'Portal Notifications', notifications_path do |notify|
    notify.item :notification, 'New Notification', new_notification_path
    notify.item :notification, 'Show Notification', notification_path(id)
    notify.item :notification, 'Edit Notification', edit_notification_path(id)
  end
end

end
end

Error:


undefined local variable or method `id'

Thanks for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions