From 6e70f376d23c21a63ff4875a1f77e19f7961b7b4 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 11 Oct 2023 14:09:00 -0400 Subject: You can backdate posts now --- app/controllers/admin/blogs_controller.rb | 2 +- app/views/admin/blogs/_form.html.haml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/controllers/admin/blogs_controller.rb b/app/controllers/admin/blogs_controller.rb index f17bce2..ea2c46c 100644 --- a/app/controllers/admin/blogs_controller.rb +++ b/app/controllers/admin/blogs_controller.rb @@ -56,7 +56,7 @@ class Admin::BlogsController < Admin::AdminController private def blog_params - params.require(:blog).permit(:title, :body, :slug, :published, :tag_list, records_attributes: [:description, :_destroy]) + params.require(:blog).permit(:title, :body, :slug, :published, :published_at, :tag_list, records_attributes: [:description, :_destroy]) end def set_section diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml index 021d1ed..625c85e 100644 --- a/app/views/admin/blogs/_form.html.haml +++ b/app/views/admin/blogs/_form.html.haml @@ -29,6 +29,9 @@ .published-field = f.check_box :published = f.label :published + .datetime-field + = f.label :published_at + = f.text_field :published_at .details-module = f.fields_for :records, Record.new do |builder| .should-create-record-field -- cgit 1.4.1