Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegate CollectionDecorator#kind_of? to the underlying decorated collection #488

Closed
wants to merge 1 commit into from

Conversation

jtrim
Copy link
Contributor

@jtrim jtrim commented Mar 4, 2013

Addresses a regression previously addressed in #92. The regression directly affects how nested forms are rendered for has_many associations decorated with 'decorates_associations'.

def kind_of?(klass)
decorated_collection.kind_of?(klass) || super
end
alias :is_a? :kind_of?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've used alias_method elsewhere, could you change this to do so as well please?

@haines
Copy link
Contributor

haines commented Mar 4, 2013

Thanks for picking this up!

@haines
Copy link
Contributor

haines commented Mar 11, 2013

Closing this as I have picked it up in #497. Thanks!

@haines haines closed this Mar 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants