Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Validation errors on redirect_url #1195
hey @merqlove this one is tricky.The case you're describing in when you create a page in 2 languages and finally decide that it will be a redirect page. The thing is that because you posted your form, it filled a blank redirect_url in all the locales. Then, it becomes impossible to modify the redirect_url.
By default, Mongoid validates the attributes of a model in all the locales https://github.com/mongodb/mongoid/blob/master/lib/mongoid/validatable/presence.rb#L31.
I don't feel good to modify the Mongoid behavior and your patch lets editors to enter a blank redirect_url which is not acceptable.
Let me see if I can come up with a good solution.