Skip to content
Snippets Groups Projects
Commit 3768a497 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Post date fix #773

parent 09633992
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ class Communication::Website::Post < ApplicationRecord ...@@ -65,7 +65,7 @@ class Communication::Website::Post < ApplicationRecord
validates :title, presence: true 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? after_save_commit :update_authors_statuses!, if: :saved_change_to_author_id?
scope :published, -> { scope :published, -> {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<%= f.input :pinned %> <%= f.input :pinned %>
</div> </div>
</div> </div>
<%= f.input :published_at, html5: true %> <%= f.input :published_at, html5: true, as: :date %>
<% end %> <% end %>
<% if @website.languages.many? %> <% if @website.languages.many? %>
<%= f.input :language_id, collection: @website.languages, include_blank: false %> <%= 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