Skip to content

Instantly share code, notes, and snippets.

@BenEddy
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenEddy/9821518 to your computer and use it in GitHub Desktop.
Save BenEddy/9821518 to your computer and use it in GitHub Desktop.
# in config/initializers/navigatrix.rb
Navigatrix.register_item_renderer(:my_item) do
def link
link_to(name, path, class: "my-class")
end
def unlinked_content
content_tag(:span, name)
end
end
# in your code
render_navigation({"Home" => "/whatever"}, {item: :my_item})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment