{"id":28816477,"url":"https://github.com/paraseba/menuer","last_synced_at":"2026-06-22T19:32:01.010Z","repository":{"id":437613,"uuid":"59282","full_name":"paraseba/menuer","owner":"paraseba","description":"Rails plugin for tab menu creation","archived":false,"fork":false,"pushed_at":"2009-06-25T19:34:25.000Z","size":88,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-15T06:06:13.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paraseba.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-10-03T18:04:41.000Z","updated_at":"2019-08-13T13:37:04.000Z","dependencies_parsed_at":"2022-07-16T13:30:49.284Z","dependency_job_id":null,"html_url":"https://github.com/paraseba/menuer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paraseba/menuer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paraseba%2Fmenuer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paraseba%2Fmenuer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paraseba%2Fmenuer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paraseba%2Fmenuer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paraseba","download_url":"https://codeload.github.com/paraseba/menuer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paraseba%2Fmenuer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34663524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-18T17:05:35.380Z","updated_at":"2026-06-22T19:32:01.004Z","avatar_url":"https://github.com/paraseba.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"h1. Menuer Rails Plugin\n\nProvides a mechanism to generate menus, handling current selection and\nvisibility.\n\nh2. Description\n\nDisplaying a menu in your application, is not a trivial task. Some of the\npoints you must take into account are\n\n* Different actions (@link_to@, @link_to_remote@).\n* Different rendering styles.\n* Current selected item feedback.  \n* Hiding or showing items according to different conditions.\n\nMenuer is a Rails plugin that simplifies all this. It has a simple but\npowerfull interface, that makes simple tasks easy, but allows a great\nflexibility when needed.\n\nh2. Usage\n\nh3. Basic usage\n\nIn your @ApplicationHelper@ module:\n\n\u003cpre\u003e\u003ccode class=\"ruby\"\u003e\n  def main_menu\n    # this menu will render using link_to, selected item will have\n    # 'selected' class in its link node.\n    returning build_menu(self, :class =\u003e :selected) do |menu|\n      # this item will go to an external URL.\n      menu.add_tab('Google', 'http://google.com')\n\n      # this item will go to a controller/action, and will be highlighted while\n      # current page is that corresponding to that controller and action.\n      menu.add_tab_with_selected_options('Other Users', {:controller =\u003e :users, :action =\u003e :index})\n\n      # this item will go to account_path action, and will be highlighted,\n      # as long as the current controller name matches the given regular\n      # expression.\n      menu.add_tab_with_selected_match('My Account', account_path(current_user), /^accounts$/)\n\n      # this item will go to public_path action, and will be highlighted,\n      # as long as the current controller name matches /^public$/, and the current\n      # action matches /^home$/.\n      menu.add_tab_with_selected_match('Home', public_path, /^public$/, /^home$/)\n    end\n  end\n\u003c/code\u003e\u003c/pre\u003e\n\nIn your layout template:\n\n\u003cpre\u003e\u003ccode class=\"ruby\"\u003e\n  \u003cdiv class=\"menu\" \u003e\n    \u003cul\u003e\n      \u003c% main_menu.each do |tab| %\u003e\n        \u003c%= content_tag(:li, tab.render)%\u003e\n      \u003c% end %\u003e\n    \u003c/ul\u003e\n  \u003c/div\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\n\nh3. Advanced usage\n\nIf the previus demo is not enough for your needs, you can do things link\nthe following (but don't forget to check the documentation)\n\n\u003cpre\u003e\u003ccode class=\"ruby\"\u003e\n  tab = menu.add_tab('My Car', my_car_url)\n  # this will show the tab, only when there is a current_user and he has a car.\n  # Otherwise, the menu item will not appear.\n  tab.visible_on {current_user \u0026\u0026 current_user.car}\n\n  # page_selector allows to fine tune when the item is highlighted.\n  # Here, we are asking to highlight only when @car variable\n  # equals the current_user car\n  tab.page_selector.on {current_user \u0026\u0026 current_user.car == @car}\n\n  # we can OR conditions on the page selector\n  tab = menu.add_tab('Profile', user_data_path(current_user))\n  tab.page_selector.on_matching_regex(/^(user_data|images|jobs)$/)\n  tab.page_selector.on_options({:controller =\u003e :hobbies})\n  tab.page_selector.on {@my_profile}\n\n  # we can use dynamic urls for the items\n  tab = menu.add_tab_with_selected_options('Best Friend', lambda {user_data_path(@my_friend)})\n\n\u003c/code\u003e\u003c/pre\u003e\n\n\nh2. Install\n\nThe usual mechanism for plugin installation\n\nruby script/plugin install git://github.com/paraseba/menuer.git\n\nOr clone the git repository.\n\n\nCopyright (c) 2008 Sebastián B. Galkin, released under the MIT license\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaseba%2Fmenuer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparaseba%2Fmenuer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaseba%2Fmenuer/lists"}