Skip to content

Commit

Permalink
Remove "Incomplete `close_tabs' definition" warning. open_tabs/close_…
Browse files Browse the repository at this point in the history
…tabs can now have zero or more arguments.
  • Loading branch information
weppos committed Dec 21, 2010
1 parent cd787d1 commit bb3f06a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rdoc
Expand Up @@ -5,6 +5,8 @@

* CHANGED: Dropped support for Rails 2.

* CHANGED: Remove "Incomplete `close_tabs' definition" warning. open_tabs/close_tabs can now have zero or more arguments.


== Release 1.3.2

Expand Down
4 changes: 0 additions & 4 deletions lib/tabs_on_rails/tabs.rb
Expand Up @@ -32,10 +32,6 @@ def initialize(context, options = {})
define_method(name) do |*args| # def open_tabs(*args)
method = @builder.method(name) # method = @builder.method(:open_tabs)
if method.arity.zero? # if method.arity.zero?
message = "Incomplete `#{name}' definition. " + # ...
"Use #{name}(*args) to ignore arguments " + # ...
"or #{name}(options) to collect options" # ...
ActiveSupport::Deprecation.warn(message) # ...
method.call # method.call
else # else
method.call(*args) # method.call(*args)
Expand Down

0 comments on commit bb3f06a

Please sign in to comment.