Skip to content

Document complex validations better #15

@pascal-za

Description

@pascal-za

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions