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

create and update should be able to take a hash #404

Open
watzon opened this issue May 28, 2020 · 3 comments
Open

create and update should be able to take a hash #404

watzon opened this issue May 28, 2020 · 3 comments

Comments

@watzon
Copy link
Contributor

watzon commented May 28, 2020

Seeing as they takes the **args and converts it into a hash anyway, it would be ideal if they could just take a hash.

@Blacksmoke16
Copy link
Contributor

Related: #370.

@watzon
Copy link
Contributor Author

watzon commented May 28, 2020

Wait, am I stupid? The create and update methods just pass the **args into create(args.to_h) and update(args.to_h), so they must already be available in a form that takes a hash, right?

@crimson-knight
Copy link
Member

@watzon makes total sense to me, I would expect this kind of behavior since it makes creating objects from data you collect during run-time.

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

No branches or pull requests

3 participants