Content of tabs_tag display twice in Rails3 app
murdoch opened this issue · 2 comments
I have tabs_on_rails plugin installed and running on rails-3.0.0.beta4 app and I'm using haml.
When I was using rails2.x, the following code was ok:
.sidebar
Welcome
- tabs_tag(:builder => MenuTabBuilder) do |tab|
= tab.home 'Home', root_path
- if logged_in?
= tab.admin 'Admin', admin_users_path
- else
%li.sidebar-link
= link_to 'Login', login_path, :id => 'login-link'
But in my Rails3 app, the code above causes the contents of the tabs_tag block AND the word "Welcome", which appears outside the tabs_tag block, to display twice. If I remove the tabs_tag block, then the sidebar contents and word "Welcome" only appear once.
Furthermore, rails complains about the dash that precedes the tabs_tag block, because rails 3 prefers you to use an "=" instead of a "-" when setting up form blocks etc, but when I change the dash to an equals sign, the content of the tabs_for block still displays twice, only the second time, the escaped HTML code for the block is printed out on the screen.
I've been trying for a while to figure out why this is happening but not having much luck.
I'm working on a Rails 3 release. It should be ready asap.
Thank you for your feedback.
The release 1.2.0 is compatible with Rails 3