Skip to content

Document complex validations better #15

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions