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

Fix updating the public_on date on persisted pages #2305

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Apr 21, 2022

When updating a page's public_on date, we need to save the associated
public page as well. This commit accomplishes that.

Prior to this commit, we would set the public_on date on the public
version, but not persist it.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@mamhoff mamhoff force-pushed the fix-setting-public-on-date branch 3 times, most recently from b05cdb3 to 26e92bc Compare April 21, 2022 13:22
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we handle this in the controller instead?

app/models/alchemy/page.rb Outdated Show resolved Hide resolved
When updating a page's `public_on` date, we need to save the associated
public page as well. This commit accomplishes that.

Prior to this commit, we would set the `public_on` date on the public
version, but not persist it.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@tvdeyen tvdeyen merged commit d1fec7c into AlchemyCMS:main Apr 21, 2022
tvdeyen added a commit that referenced this pull request Apr 26, 2022
Fix updating the public_on date on persisted pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants