Skip to content

Commit

Permalink
Merge pull request #36 from dtaniwaki/patch-1
Browse files Browse the repository at this point in the history
Use correct way to respond_to
  • Loading branch information
timoschilling committed Oct 26, 2014
2 parents f0336e1 + 47d7a01 commit 1268e62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/arbre/context.rb
Expand Up @@ -67,8 +67,8 @@ def bytesize
end
alias :length :bytesize

def respond_to?(method)
super || cached_html.respond_to?(method)
def respond_to_missing?(method, include_all)
super || cached_html.respond_to?(method, include_all)
end

# Webservers treat Arbre::Context as a string. We override
Expand Down
4 changes: 2 additions & 2 deletions lib/arbre/rails/forms.rb
Expand Up @@ -16,8 +16,8 @@ def select(*args)
proxy_call_to_form :select, *args
end

def respond_to?(name)
if form_builder && form_builder.respond_to?(name)
def respond_to_missing?(method, include_all)
if form_builder && form_builder.respond_to?(method, include_all)
true
else
super
Expand Down

0 comments on commit 1268e62

Please sign in to comment.