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.
Some validations in the migrant DSL can get very complex and generate interoperability issues with different Ruby versions.
See presidentbeef/brakeman#25
Possible solutions
Just throwing some ideas around right now.