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

Fix wrong decoration for nested classes #105

Merged
merged 1 commit into from Aug 15, 2019

Conversation

sinsoku
Copy link
Contributor

@sinsoku sinsoku commented Aug 10, 2019

ActiveDecorator decorates incorrectly for the nested class that do not define decorator.

comic = Foo::Comic.new
ActiveDecorator::Decorator.instance.decorate(comic)
comic.is_a?(ComicDecorator)  #=> true

If Foo::ComicDecorator is not defined, it should not use ComicDecorator instead of Foo::ComicDecorator.
The cause of the problem is 73dcdd6, so we will revert it.

ActiveDecorator decorates incorrectly for the nested class that do not define decorator.

```ruby
comic = Foo::Comic.new
ActiveDecorator::Decorator.instance.decorate(comic)
comic.is_a?(ComicDecorator)  #=> true
```

If `Foo::ComicDecorator` is not defined, it should not use `ComicDecorator` instead of `Foo::ComicDecorator`.
The cause of the problem is 73dcdd6, so we will revert it.
@amatsuda amatsuda merged commit 28d9bcc into amatsuda:master Aug 15, 2019
@sinsoku sinsoku deleted the patch/fix_a_wrong_decoration branch August 16, 2019 00:01
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.

None yet

2 participants