[Rails] [ANN] MenuEngine
Jean-Daniel Beaubien
jd at jackdan.net
Fri Jul 28 03:48:32 GMT 2006
Hi there, your engine seems really nice, but I can't get it to work.
I followed the little tutorial at the link you gave but the call <%=
menu :menu => "my_menu" %> outputs an empty <script></script>.
Here is the code I used (I am trying to do some kind of bug tracking
tool. And yes the controller and action are valid)
application_helper.rb
-----------------------------
module ApplicationHelper
include MenuHelper
def my_menu
item_0 = MenuItem.new( :text=>"Menu Item 0", :controller=>"bug" )
item_1 = MenuItem.new( :text=>"Menu Item 1", :controller=>"bug",
:action=>"show" )
item_2 = MenuItem.new( :text=>"Menu Item 2", :controller=>"bug",
:action=>"show" )
item_0.items << item_1 << item_2
item_3 = MenuItem.new( :text=>"Menu Item 3", :controller=>"bug" )
return [item_0, item_3]
end
end
environment.rb
-------------------------------
module UserEngine
config :access_control, false
end
Engines.start :menu # or :menu_engine
And my basic layout:
application.rhtml
-----------------------------
<html>
<head>
<%= javascript_include_tag :defaults %>
<%= engine_stylesheet "menu_engine" %>
<%= engine_javascript "menu_engine" %>
</head>
<body>
<div id="top_menu">
<%= menu :menu => "my_menu" %>
</div>
All this outputs only
...
<div id="top_menu">
<script></script>
</div>
...
What in the world am I doing wrong???
Thank you for your time,
Jd
P.S. Yes I did install the menu_engine engine.
Max Muermann wrote:
> Hi all,
>
> MenuEngine is a small Rails engine that can generate templated
> drop-down DHTML menus commonly used for web site navigation. Supports
> creation of menus from a YAML file, from code and from pre-configured
> HTML. Optionally integrates with UserEngine for authorization.
>
> http://www.muermann.org/ruby/menu_engine
>
> Project page:
> http://rubyforge.org/projects/menuengine
>
> This is my first attempt to release a Rails plugin, so please let me
> know if I got the distribution wrong and you have installation
> problems.
>
> Cheers,
> Max
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
More information about the Rails
mailing list