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 a way to manage attributes set during run. #1

Closed
AaronLasseigne opened this issue Jun 26, 2013 · 1 comment · Fixed by #3
Closed

Add a way to manage attributes set during run. #1

AaronLasseigne opened this issue Jun 26, 2013 · 1 comment · Fixed by #3
Milestone

Comments

@AaronLasseigne
Copy link
Owner

There needs to be a way to cast incoming attributes to specific types. There should also be a way to set a default and do minor adjustments (like strip on String).

Reference: https://github.com/cypriss/mutations/wiki/Filtering-Input

@AaronLasseigne
Copy link
Owner Author

Ideas for syntax:

attrs do
  string  :name,
    allow_nil: true
  string  :email
  boolean :subscribed,
    default: true
end

or

string :name,
  allow_nil: true
string :email
boolean :subscribed,
  default: true

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

Successfully merging a pull request may close this issue.

1 participant