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

Array-ness of columns is completely ignored #61

Open
magni- opened this issue Jul 31, 2019 · 0 comments
Open

Array-ness of columns is completely ignored #61

magni- opened this issue Jul 31, 2019 · 0 comments

Comments

@magni-
Copy link

magni- commented Jul 31, 2019

-- in table `articles`
tags character varying(40)[]

What gets added:

# in model `Article`
validates_length_of :tags, maximum: 40

So instead of limiting each item in the array to 40 characters, we limit the array to 40 items!

A quick fix would be skipping adding validations for attributes where column.array? is true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant