Closed ghost closed 14 years ago
The reason is that the standard Builder doesn't allow you to pass additional parameters to the tab. In other words, the :style
parameter is not allowed.
However, because this is a frequent request, I've added the feature in the release 1.3.0. Be sure to update the gem.
Added Ability to customize the behavior and the style of the li tab item passing a hash of options (closed by 093f6cc431cdf5f5b462fc320c681cac39a4e421)
Hi, I'm getting the same wrong number of arguments error and I'm using the 1.3.0 gem. Any ideas?
Are you sure you are using the version 1.3.0? Did you run bundle install again with the updated version?
Yes, I tried using both the 1.3.0 gem and the latest source. Running bundle install didn't fix it either. The stack trace is only slightly different from above:
vendor/plugins/weppos-tabs_on_rails-51bff5b/lib/tabs_on_rails/tabs.rb:47:in `tab_for' vendor/plugins/weppos-tabs_on_rails-51bff5b/lib/tabs_on_rails/tabs.rb:47:in `method_missing' vendor/plugins/weppos-tabs_on_rails-51bff5b/lib/tabs_on_rails/tabs.rb:64:in `render' vendor/plugins/weppos-tabs_on_rails-51bff5b/lib/tabs_on_rails/tabs.rb:62:in `tap' vendor/plugins/weppos-tabs_on_rails-51bff5b/lib/tabs_on_rails/tabs.rb:62:in `render' vendor/plugins/weppos-tabs_on_rails-51bff5b/lib/tabs_on_rails/controller_mixin.rb:205:in `tabs_tag'
I am getting the same error: wrong number of arguments (2 for 3) 27: = tabs_tag do |tab| 28: = tab.organizations "Organisationer", organizations_path if can? :manage, Organization 29: = tab.cms "CMS", pages_path if can? :manage, Organization
I am using the gem version 1.3.0. Rails 3.0.0.rc. Ruby 1.8.7.
I was previously using the fork at http://github.com/atomgas/tabs_on_rails which was working. I am making multiple calls to tabs_tag do |tag| in my application layout
Please try the release 1.3.1. It should work now.
Fixed error "wrong number of arguments (2 for 3)" (closed by 7cc890e6d63bd47885a92a9bc6b85d2e6340ed09)
just a confirmation that it's working for me. Thanks weppos!
Hi,
This might be a trivial problem, I'm new with rails and I've just downloaded release 1.2 of tabs_on_rails. I am using Rails 3. My tabs section is defined as follows:
The following error is then generated:
Stack trace is: