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

Upgrading to 0.4.6 breaks Runtime Exposure #163

Closed
ozgun opened this issue Aug 3, 2015 · 5 comments
Closed

Upgrading to 0.4.6 breaks Runtime Exposure #163

ozgun opened this issue Aug 3, 2015 · 5 comments
Labels

Comments

@ozgun
Copy link

ozgun commented Aug 3, 2015

Here is my entity:

expose :my_custom_field

private

def my_custom_field
  1
end

After upgrading to 0.4.6, I started to get the following error:

NoMethodError (MyEntity missing attribute my_custom_field on #<MyEntity:0xdc60c70>):

If I downgrade to 0.4.5 everything works fine.

Thanks.

@dblock
Copy link
Member

dblock commented Aug 3, 2015

Does it matter that that method is private (vs. public)?

@dblock dblock added bug? and removed bug labels Aug 3, 2015
@marshall-lee marshall-lee added bug and removed bug? labels Aug 3, 2015
@ozgun
Copy link
Author

ozgun commented Aug 3, 2015

No, it does not.

@marshall-lee
Copy link
Member

@dblock It's a regression introduced in #147. This is my fault and not sufficient specs fault. I'll create a 0-4 branch for such issues and fix it soon.

marshall-lee added a commit to marshall-lee/grape-entity that referenced this issue Aug 3, 2015
This one fixes a regression introduced in ruby-grape#147: entity instance methods
were exposed with `NoMethodError`.
Fixes ruby-grape#163. Additional specs are added.
marshall-lee added a commit to marshall-lee/grape-entity that referenced this issue Aug 3, 2015
This one fixes a regression introduced in ruby-grape#147: entity instance methods
were exposed with `NoMethodError`.
Fixes ruby-grape#163. Additional specs are added.
@marshall-lee
Copy link
Member

This behavior was intended but specs not shown this regression while working on #147.

marshall-lee added a commit to marshall-lee/grape-entity that referenced this issue Aug 3, 2015
This one fixes a regression introduced in ruby-grape#147: entity instance methods
were exposed with `NoMethodError`.
Fixes ruby-grape#163. Additional specs are added.
@marshall-lee
Copy link
Member

@ozgun thanks for opening this issue! I pushed a fixed 0.4.7 to rubygems.

marshall-lee added a commit to marshall-lee/grape-entity that referenced this issue Aug 10, 2015
This one fixes a regression introduced in ruby-grape#147: entity instance methods
were exposed with `NoMethodError`.
Fixes ruby-grape#163. Additional specs are added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants