Socket
Book a DemoInstallSign in
Socket

navigator_rails

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

navigator_rails

0.0.12
bundlerRubygems
Version published
Maintainers
1
Created
Source

= NavigatorRails

This is a gem intended to make (bootstrap-)menu generation clean and easy.

== Installation

Add the following to your Gemfile

gem 'navigator_rails'

And run

bundle install

== Setup

Run

rails g navigator_rails:install

to get the initializer under

config/initializers/navigator.rb

Customizer the brand to your needs.

== Attaching Actions to the menu

Put

include NavigatorRails::Navigatable

in every controller, which may add menu_items

Then add the menu_items like follows:

menu_item path: unix_like_path_of_item_position, constraint: ruby_code_as_string_should_return_true_for_displaying, content: ruby_code_which_will_be_embedded, active_on: action_name_of_as_symbol, order: unique_integer, type: decorator_type_as_symbol

Example:

menu_item path: '/head/left/Posts/new', constraint: 'can? :create, Post', content: 'link_to "Posts", new_post_path', order: 1, active_on: :new

= Structure

The menu-builder will create the missing items in between the item and the root-item applying the decorators defined in

NavigatiorRails.config[:decorators]

= Code Climate

Climtate: {}[https://codeclimate.com/github/steigr/navigator_rails] Coverage: {}[https://codeclimate.com/github/steigr/navigator_rails]

FAQs

Package last updated on 02 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.