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

Transformations in Trash are inherited correctly #207

Closed

Conversation

FoboCasteR
Copy link
Contributor

The problem:

class Result < Hashie::Trash
  property :some_property, from: 'someValue'
end

class OtherResult < Result
  # Other properties...
end

Result.transforms # => {'someValue'=>:some_property}
OtherResult.translations # => {}

OtherResult.new('someValue' => 'foo')
# => NoMethodError: The property 'someValue' is not defined for OtherResult.

@dblock
Copy link
Member

dblock commented Aug 21, 2014

Good. Could you please update CHANGELOG, too. Thank you.

@FoboCasteR FoboCasteR force-pushed the inheritable-trash-translations branch from 654c613 to 0d2b212 Compare August 21, 2014 15:28
@FoboCasteR
Copy link
Contributor Author

Changelog has been updated.

@dblock
Copy link
Member

dblock commented Aug 22, 2014

Merged squashed via 05aee4d. Thanks!

@dblock dblock closed this Aug 22, 2014
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