pascalh1011/migrant — Issue #15: Document complex validations better
Author: pascalh1011
Created: 2011-12-27 11:34:27+00:00
State: open
Labels: feature, major release

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

See https://github.com/presidentbeef/brakeman/issues/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)

```ruby
structure do
some_really_validated_field do
validates :presence
validates :inclusion, :in => %w(Apple Pear)
end
end
```

Just throwing some ideas around right now.