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

Document complex validations better #15

Open
pascal-za opened this issue Dec 27, 2011 · 0 comments
Open

Document complex validations better #15

pascal-za opened this issue Dec 27, 2011 · 0 comments

Comments

@pascal-za
Copy link
Owner

Some validations in the migrant DSL can get very complex and generate interoperability issues with different Ruby versions.

See presidentbeef/brakeman#25

Possible solutions

  • Expanded documentation to give further validation examples (serving as 'templates' if you like)
  • Simplified multiple validations (perhaps writing the field declaration as a block or something)
structure do
  some_really_validated_field do
    validates :presence
    validates :inclusion, :in => %w(Apple Pear)
  end 
end

Just throwing some ideas around right now.

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

1 participant