-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Show errors when has_many restrict_with_error. #961
Conversation
vgsantoniazzi
commented
Aug 10, 2017
- Return full_messages with new line separator
spec/models/order_spec.rb
Outdated
|
||
order.destroy | ||
|
||
expect(order.errors[:base]).to eq(["Cannot delete record because dependent payments exist"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [96/80]
if requested_resource.destroy | ||
flash[:notice] = translate_with_resource("destroy.success") | ||
else | ||
flash[:error] = requested_resource.errors.full_messages.join("<br/>").html_safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [87/80]
spec/models/order_spec.rb
Outdated
order.destroy | ||
|
||
expect(order.errors[:base]).to eq( | ||
["Cannot delete record because dependent payments exist"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a comma after the last parameter of a multiline method call.
spec/models/order_spec.rb
Outdated
order.destroy | ||
|
||
expect(order.errors[:base]).to eq( | ||
["Cannot delete record because dependent payments exist"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a comma after the last parameter of a multiline method call.
133f77a
to
ade6fca
Compare
This is looking good! Would you be able to provide a screenshot for when you have multiple errors? From reading the implementation, it looks like it'll add a |
ade6fca
to
d5f32fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
.rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Na...
.rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Naming .rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout .rubocop.yml: Style/AsciiIdentifiers has the wrong namespace - should be Naming .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout .rubocop.yml: Style/ExtraSpacing has the wrong namespace - should be Layout .rubocop.yml: Style/FileName has the wrong namespace - should be Naming .rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout .rubocop.yml: Style/MultilineMethodCallIndentation has the wrong namespace - should be Layout .rubocop.yml: Style/PredicateName has the wrong namespace - should be Naming .rubocop.yml: Style/InitialIndentation has the wrong namespace - should be Layout Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was never being actually triggered. (obsolete configuration found in .rubocop.yml, please update it) The `Style/OpMethod` cop has been renamed and moved to `Naming/BinaryOperatorParameterName`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
.rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Na...
.rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Naming .rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout .rubocop.yml: Style/AsciiIdentifiers has the wrong namespace - should be Naming .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout .rubocop.yml: Style/ExtraSpacing has the wrong namespace - should be Layout .rubocop.yml: Style/FileName has the wrong namespace - should be Naming .rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout .rubocop.yml: Style/MultilineMethodCallIndentation has the wrong namespace - should be Layout .rubocop.yml: Style/PredicateName has the wrong namespace - should be Naming .rubocop.yml: Style/InitialIndentation has the wrong namespace - should be Layout Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was never being actually triggered. (obsolete configuration found in .rubocop.yml, please update it) The `Style/OpMethod` cop has been renamed and moved to `Naming/BinaryOperatorParameterName`.
* Return full_messages with new line separator
d5f32fc
to
960313f
Compare
@nickcharlton seems good? |
This looks great! I'm going to go ahead and merge. |