Skip to content
Snippets Groups Projects
Unverified Commit d60ee3b1 authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Merge pull request #774 from noesya/fix_post_date

Amélioration de la gestion des dates des posts
parents 09633992 3768a497
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ class Communication::Website::Post < ApplicationRecord
validates :title, presence: true
before_validation :set_published_at, if: :published_changed?
before_validation :set_published_at
after_save_commit :update_authors_statuses!, if: :saved_change_to_author_id?
scope :published, -> {
......
......@@ -36,7 +36,7 @@
<%= f.input :pinned %>
</div>
</div>
<%= f.input :published_at, html5: true %>
<%= f.input :published_at, html5: true, as: :date %>
<% end %>
<% if @website.languages.many? %>
<%= f.input :language_id, collection: @website.languages, include_blank: false %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment