[Rails] Enterprise menu - yet another try on creating internal DSL for defining menus - easy of course!
Hi guys,
I've created 'emenu' gem that is supposed to take of burned of
maintaining and tweaking menu layout https://rubygems.org/gems/emenu.
It's main purpose is usage in larger projects or admin pages that have
a lot of options and a lot of rules regarding who gets to see what. It
is really rough on the edges, and I don't even have a quick link
options (that will depend on currently selected menu option), but I am
looking for as much feedback as I can get. Release early, release
often kind of thing.
This is my first gem ever so I spend most of yesterday on stupid
errors with Psych:Syck etc... but nevertheless it can be checked out
at: http://emenu.12ip.net/
This is example DSL needed to fuel that demo:
@menu = MenuConfig.new
@menu.item :transportation do
item :cars
item :trains do
item :fast_trains
item :slow_trains
end
item :planes do
item :boeing do
item :boeing747 do
item :older_ready_to_crash
item :brand_new
end
item :boeing474
end
item :airbus
end
end
@menu.item :orders do
item :bread
item :butter
item :chunky_bacon
end
Best Regards,
Kresimir Bojcic
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home