We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In Rails 5 belongs_to relationships are required by default.
belongs_to
However if you just have;
class Model < ApplicationRecord belongs_to :other_model end
Then RailsAdmin marks this field as optional. This can be addressed in the model by doing;
class Model < ApplicationRecord belongs_to :other_model, required: true end
It would be nice if RailsAdmin took into account the version of Rails when deciding if a relationship is required or not.
The text was updated successfully, but these errors were encountered:
I think the reason is because the validation is actually getting killed somehow. I subitted an issue: #2785.
Sorry, something went wrong.
@ordinaryzelig nice, I will close this issue.
No branches or pull requests
In Rails 5
belongs_to
relationships are required by default.However if you just have;
Then RailsAdmin marks this field as optional. This can be addressed in the model by doing;
It would be nice if RailsAdmin took into account the version of Rails when deciding if a relationship is required or not.
The text was updated successfully, but these errors were encountered: