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

Add fetch method to fetch from opts_hash #226

Merged
merged 1 commit into from
Jun 26, 2016

Conversation

alanjcfs
Copy link
Contributor

We use fetch often to get options (raising an error if an option doesn't exist) as well as to provide a alternative value if an option is not provided.

@dblock
Copy link
Member

dblock commented Jun 23, 2016

I like it. This needs tests and a CHANGELOG entry please.

@alanjcfs alanjcfs force-pushed the add-fetch-to-entity-options branch 4 times, most recently from 0293322 to f912e28 Compare June 24, 2016 00:49
Add a line to CHANGELOG about fetch method

Add specs for `#fetch`

`#fetch` will pass the method to the option hash.
@alanjcfs alanjcfs force-pushed the add-fetch-to-entity-options branch from f912e28 to c42f4b6 Compare June 24, 2016 07:30
@alanjcfs
Copy link
Contributor Author

@dblock Thanks for the feedback. I added the specs at the end of the spec as there was no specific specs for Grape::Entity::Options. Let me know if there's anything to improve. I also squashed the commits.

@dblock dblock merged commit d65df18 into ruby-grape:master Jun 26, 2016
@dblock
Copy link
Member

dblock commented Jun 26, 2016

Merged, looks good.

@alanjcfs alanjcfs deleted the add-fetch-to-entity-options branch June 28, 2016 21:17
@reneklacan
Copy link

It's pretty long time so maybe it would be nice to release new version with this 😇

@dblock
Copy link
Member

dblock commented Nov 11, 2016

@idyll @marshall-lee ^^^

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

3 participants