Skip to content

Conversation

@mhenrixon
Copy link
Contributor

@mhenrixon mhenrixon commented May 15, 2019

Before this change the only way I could find to access a hash with string keys
was to either convert it to a symbol hash or define methods in the entity.

This should at least allow the entire hash to be accessed with string keys yet default to existing behavior (symbol keys).

If anyone has suggestions for how to improve this I'm all ears. This was just the quickest least intrusive thing I could think of at the time.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 95.857% when pulling 6aeab06 on mhenrixon:master into 1443468 on ruby-grape:master.

@coveralls
Copy link

coveralls commented May 15, 2019

Coverage Status

Coverage decreased (-0.2%) to 95.857% when pulling e07c29d on mhenrixon:master into 1443468 on ruby-grape:master.

@grape-bot
Copy link

grape-bot commented May 15, 2019

1 Error
🚫 One of the lines below found in CHANGELOG.md doesn’t match the expected format. Please make it look like the other lines, pay attention to periods and spaces.
* [#307](https://github.com/ruby-grape/grape-entity/pull/307): Allow exposures to call methods defined in modules included in an entity [@robertoz-01](https://github.com/robertoz-01).

Generated by 🚫 danger

mhenrixon added 2 commits May 15, 2019 18:19
Before this change the only way I could find to access a hash with string keys was to either convert it to a symbol hash or define methods in the entity. This should at least allow the entire hash to be accessed with string keys yet default to existing behaviour (symbol keys).
@LeFnord
Copy link
Member

LeFnord commented Oct 3, 2019

thanks @mhenrixon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants