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: Save Entry#summary when Writing Entries #14

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/furniture/journal/entries/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<%= form_with model: entry.location, class: "flex flex-col grow" do |f| %>
<%= render "text_field", { attribute: :headline, form: f} %>
<%= render "text_area", { attribute: :summary, form: f} %>

<%= render "text_area", { attribute: :body, form: f, field_classes: "grow", container_classes: "grow flex flex-col"} %>
<%= render "datetime_field", { attribute: :published_at, form: f} %>

Expand Down
2 changes: 1 addition & 1 deletion app/furniture/journal/entry_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def update?
end

def permitted_attributes(_params)
%i[headline body published_at]
%i[headline summary body published_at]
end

class Scope < ApplicationScope
Expand Down
Loading