You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
you have to pass a resource/object to the show and edit url_helpers which you usually load in the controllers. e.g. notification_path(@notification) or edit_notification_path(@notification) --> id is not defined in your case...
You should guard your show and edit items agains nil-objects, i.e. the items should not be evaluated if @notification is nil or not set, e.g.
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|
end
end
Error:
undefined local variable or method `id'
Thanks for any help!
The text was updated successfully, but these errors were encountered: