Sha256: d203a2e764509079cee77a14259b0c5c4823b990849708540beba5f966674bd6

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

= Lolita Menu
Create, sort and publish menus with Lolita.

==Instalation
In your project Gemfile put
  gem 'lolita-menu'
And run
  bundle install
Like with other Lolita gems call
  rails g lolita_menu:install
Since this gem comes with migrations
  rake db:migrate 
=== Using autocomplete
Before that you must follow Install instruction.
To use autocomplete you need to add all possible url's in <b>config/lolita-menu-urls.rb</b>
====Example
  # This will add contacts url and all possible URL's from Page model.
  Lolita::Menu::Urls.create do 
    add "/contacts", "Contacts"
    Pages.each do |page|
      add "/#{page.friendly_id}", page.title
    end
  end
After that you can popuate all from file in result file by execucuting
  rake lolita_menu:generate_urls
If you want to add url when some of objects are created, then in your model add after_save or after_create callbacks and in related method add
  Lolita::Menu::Urls.add("/link", "Label"), unfortuneately it's impossible to use routes helper methods unless you do your own workaround.
Enjoy!
    
==Copyright
Copyright © 2011 ITHouse and Arturs Meisters. See LICENSE.txt for further details.

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lolita-menu-0.1.4 README.rdoc
lolita-menu-0.1.1 README.rdoc
lolita-menu-0.1.0 README.rdoc
lolita-menu-0.0.15 README.rdoc