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

🐞🔨 Journal: Show error messages when Entry cannot be saved #1630

Merged

Conversation

zspencer
Copy link
Member

@zspencer zspencer commented Jul 4, 2023

Womp womp; apparently I had forgotten to do the unprocessable_entity, which meant that turbo was failing miserably instead of replacing the form when creating or updating a journal entry.

Well; now it's fixed!

- https://github.com/zinc-collective/convene/issues/1566

Womp womp; apparently I had forgotten to do the `unprocessable_entity`,
which meant that `turbo` was failing miserably instead of replacing the
form when creating or updating a journal entry.

Well; now it's fixed!
@zspencer zspencer requested review from a team July 4, 2023 04:00
@@ -9,6 +9,7 @@ class Entry < ApplicationRecord
scope :recent, -> { order("published_at DESC NULLS FIRST") }

attribute :headline, :string
validates :headline, presence: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really part of your PR, but now that we have the strip_attributes gem, it might be worth throwing that on for headline and body, just so that we don't store trailing/preceding whitespace.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah! I was thinking about that then I forgot 🤦

Copy link
Member

@anaulin anaulin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@zspencer zspencer merged commit 14d6ce1 into main Jul 6, 2023
@zspencer zspencer deleted the journal/correctly-handle-unprocessable-journal-entries branch July 6, 2023 00:20
zspencer added a commit that referenced this pull request Jul 6, 2023
- https://github.com/zinc-collective/convene/issues/1566
- #1630 (comment)

> Not really part of your PR, but now that we have the
> `strip_attributes` gem, it might be worth throwing that on for
> `headline` and `body`, just so that we don't store trailing/preceding
> whitespace.
zspencer added a commit that referenced this pull request Jul 6, 2023
- https://github.com/zinc-collective/convene/issues/1566
- #1630 (comment)

> Not really part of your PR, but now that we have the
> `strip_attributes` gem, it might be worth throwing that on for
> `headline` and `body`, just so that we don't store trailing/preceding
> whitespace.
@zspencer zspencer added 🐞 bug Something isn't working 🔨 Squashed Bugs we think we fixed labels Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🔨 Squashed Bugs we think we fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants