-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
🐞🔨 Journal
: Show error messages when Entry
cannot be saved
#1630
Conversation
- 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!
@@ -9,6 +9,7 @@ class Entry < ApplicationRecord | |||
scope :recent, -> { order("published_at DESC NULLS FIRST") } | |||
|
|||
attribute :headline, :string | |||
validates :headline, presence: true |
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.
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.
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.
Yah! I was thinking about that then I forgot 🤦
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.
👍🏼
- 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.
- 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.
Journal
: WritingEntries
journal#2Womp womp; apparently I had forgotten to do the
unprocessable_entity
, which meant thatturbo
was failing miserably instead of replacing the form when creating or updating a journal entry.Well; now it's fixed!