Permalink
Commits on Feb 22, 2012
  1. Makes what used to be a rails plugin into a gem, since plugins are de…

    …precated.
    
    * Adds a Rakefile with a default task to run the specs
    * Moves the generator template files around and defines a Rails::Engine to point
      to them to be used without modification
    * Adds a gemspec
    * Cleans up some path stuff
    committed Feb 22, 2012
Commits on Jun 29, 2011
  1. Fix: specs bug (almost all failed for their specy reasons, no real bu…

    …g) and #current_item attribute behavior fix
    Roman Snitko committed Jun 29, 2011
Commits on May 24, 2011
  1. @snitko
Commits on May 22, 2011
  1. @snitko

    :html_options for #item_markup method (#more)

    Usecase example:
      new_messages_html_option = (got_new_messages? ? { :class => "unread" } : {})
      mmmenu do |l1|
        l1.add "Messages", messages_path, :html_options => new_messages_html_options
      end
    
    Output:
      <a href="/messages" class="unread">Messages</a>
    snitko committed May 22, 2011
Commits on May 12, 2011
  1. @snitko
  2. @snitko

    New technique for specifying current and non-current menu items (olde…

    …r one is not valid anymore) (#more)
    
    By default, build_mmmenu helper defines two partial templates for each level of the menu -
    one for the current (formerly called "active") item and one for non-current items.
    These templates are called "mmmenu/_item" and "mmmenu/_current_item".
    
    Disclaimer: if you call Mmmenu#item_markup for a certain level, you MUST call Mmmenu#current_item_markup
    for the same level.
    snitko committed May 12, 2011
  3. @snitko

    `mmmenu` method available in all controllers, shorthand for @menu = M…

    …mmenu.new(:request => request)
    snitko committed May 12, 2011
  4. @snitko

    Html markup for item and levels is now stored in templates under view…

    …s/mmmenu/ (#more)
    
    Those templates may be replaced and customized:
    `rails g mmmenu` copies them and mmmenu_helper.rb into the app dir and
    you may easily customize them or replace with whatever blows your skirt up.
    
    That said, `rails g mmmenu` is now an optional installation step.
    snitko committed May 12, 2011
Commits on Nov 29, 2010
  1. Adding html_safe to helper

    Roman Snitko committed Nov 29, 2010
Commits on Nov 7, 2010
  1. Spelling fix.

    Yury Velikanau committed Nov 7, 2010
  2. Change README and add more examples.

    Yury Velikanau committed Nov 7, 2010
Commits on Nov 6, 2010
  1. Add html options to default item markup.

    Yury Velikanau committed Nov 6, 2010
  2. Allows you to pass not only current active markup

    option, but whatever you need.
    
    This can be used in common cases when your LI in menu
    is whether active or not and you need to pass
    something for your a tag (or even better - pass html
    options for your link_to as you usually do in rails).
    Yury Velikanau committed Nov 6, 2010
Commits on Sep 14, 2010
  1. Fix: rails3 generators

    Roman Snitko committed Sep 14, 2010
Commits on Sep 7, 2010
  1. @snitko
Commits on May 11, 2010
  1. Merge branch 'master' of git@github.com:snitko/mmmenu

    Conflicts:
    	lib/mmmenu.rb
    Roman Snitko committed May 11, 2010
  2. New: match params in the request

    DESCRIPTION
    A new option may be added to subarrays included in a :path option.
    The third array element, which must be hash, may contain a list of request params
    to match against, for example
    
        l1.add "Articles" articles_path, :paths => [[articles_path, 'get', {:filter => 'published'}]]
    
    rule will match only against "/articles?filter=published" url.
    Roman Snitko committed May 11, 2010
Commits on Feb 23, 2010
  1. Refactoring: ugly unreadable #build_level method just got better

    I moved matching against paths and finding an active item to a couple of
    separate methods. Now finding an active item process (str 57-68) became readable,
    it's easy to see what's going and add patches. API is not affected.
    Roman Snitko committed Feb 23, 2010
Commits on Feb 22, 2010
  1. New: manually setting the active item feature

    see the bottom of README
    Roman Snitko committed Feb 22, 2010
Commits on Feb 3, 2010
  1. New: * wildcard for paths

    Usage
    l1.add "Items",   "/", :paths => [['/', 'get'], ['/items/*']]
    Roman Snitko committed Feb 3, 2010
Commits on Jan 22, 2010
  1. Markup fix for README

    Roman Snitko committed Jan 22, 2010
  2. README file

    Roman Snitko committed Jan 22, 2010
  3. New: mmmenu_helper generator

    Roman Snitko committed Jan 22, 2010
  4. Initial commit, basic mmmenu classes and specs

    Roman Snitko committed Jan 22, 2010