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

Publish Scheduled Page if its Published At Date is Today or Earlier #924

Merged
merged 1 commit into from
Mar 11, 2025
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: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
trusty-cms (7.0.21)
trusty-cms (7.0.22)
RedCloth (= 4.3.3)
activestorage-validator
acts_as_list (>= 0.9.5, < 1.3.0)
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/page_status_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def process_pages(pages)
pages.each do |page|
page_id = page.id
published_at = page.published_at
if published_at && published_at <= Time.now

# Publish the page if its scheduled publish date is today or earlier
if published_at && published_at.beginning_of_day <= Time.now
page.update(status_id: Status[:published].id)
updated_pages << page_id
else
Expand Down
2 changes: 1 addition & 1 deletion lib/trusty_cms/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module TrustyCms
VERSION = '7.0.21'.freeze
VERSION = '7.0.22'.freeze
end
Loading