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 page seeder #2389

Merged
merged 2 commits into from
May 26, 2023
Merged

Fix page seeder #2389

merged 2 commits into from
May 26, 2023

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Dec 6, 2022

What is this pull request for?

If you pass a public_on date to the page seeder,
Alchemy will create a public version (because of the
public_on= attribute writer). The before_create filter
kicks in too late, leading to public pages without a
draft version.

Tried to use different before filters in the page model,
but nothing worked. So I fixed the problem where it
happens in the page seeder.

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
Copy link
Contributor

mamhoff commented Dec 7, 2022

As discussed IRL, page creation should probably live in some kind of factory object, as the internals of the page are becoming increasingly complex.

@tvdeyen tvdeyen marked this pull request as draft December 20, 2022 10:55
@github-actions
Copy link

This pull request has not seen any activiy in a long time.
Probably because of missing tests or a necessary rebase.
This PR will be closed in 7 days if no further activity happens.

@github-actions github-actions bot added the Stale label Mar 21, 2023
@github-actions
Copy link

This pull request has not seen any activiy in a long time.
Probably because of missing tests or a necessary rebase.
Please open a new PR to latest main if you want to continue working on this.
Thanks for the contribution.

@github-actions github-actions bot closed this Apr 21, 2023
@tvdeyen tvdeyen reopened this May 26, 2023
@tvdeyen
Copy link
Member Author

tvdeyen commented May 26, 2023

We need that, so the demo can be deployed. Addressing the comment in another PR

@tvdeyen tvdeyen marked this pull request as ready for review May 26, 2023 06:16
@tvdeyen tvdeyen force-pushed the fix-page-seeder branch from 8137117 to 68bd088 Compare May 26, 2023 06:19
@tvdeyen tvdeyen mentioned this pull request May 26, 2023
tvdeyen added 2 commits May 26, 2023 08:22
Ruby 3.1 does not allow Date in yml by default anymore.
If you pass a public_on date to the page seeder,
Alchemy will create a public version (because of the
public_on= attribute writer). The before_create filter
kicks in too late, leading to public pages without a
draft version.

Tried to use different before filters in the page model,
but nothing worked. So I fixed the problem where it
happens in the page seeder.
@tvdeyen tvdeyen force-pushed the fix-page-seeder branch from 68bd088 to 9f4c8c5 Compare May 26, 2023 06:22
@tvdeyen tvdeyen merged commit 5c97d46 into AlchemyCMS:main May 26, 2023
@tvdeyen tvdeyen deleted the fix-page-seeder branch May 26, 2023 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants