README.rdoc in menu_builder-0.0.2 vs README.rdoc in menu_builder-0.2.0

- old
+ new

@@ -28,15 +28,15 @@ === View ==== ERB code - <% tabs :id=>"mainMenu", :class=>"menu" do |tab| %> - <%= tab.account 'Account', account_path, :style => 'float: right' %> - <%= tab.users 'Users', users_path, :style => 'float: right' %> - <%= tab.mydashboard 'Dashboard', '/' %> - <%= tab.projects 'Projects', projects_path %> + <% menu :id=>"mainMenu", :class=>"menu" do |m| %> + <%= m.account 'Account', account_path, :style => 'float: right' %> + <%= m.users 'Users', users_path, :style => 'float: right' %> + <%= m.mydashboard 'Dashboard', '/' %> + <%= m.projects 'Projects', projects_path %> <% end %> ==== HTML Result <ul id="mainMenu" class="menu"> @@ -49,19 +49,15 @@ ==== Blocks for content Also is possible to pass blocks instead of simple strings for content. In this way you can create tabs with icons. Like below: - <% tabs do |tab| %> - <% tab.account account_path do %> - <%= image_tag "account.jpg" /> Accounts + <% menu do |tab| %> + <% m.account account_path do %> + <%= image_tag "icon.jpg" /> Accounts <% end %> - <% tab.users users_path do %> - <%= image_tag "user.jpg" /> Users - <% end %> - <% tab.posts posts_path do %> - <%= image_tag "posts.jpg" /> Posts - <% end %> + <%= m.users "Users", users_path %> + <%= m.posts "Posts", posts_path %> <% end %> == CSS and HTML This plugin don't came with any kind of asset like image or css. The layout of tabs and the way of show it depends of you css architecture. You can use any kind of technique with html UL and LI, like below: \ No newline at end of file