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

Embed polls in articles #304

Merged
merged 2 commits into from
Dec 7, 2024
Merged

Embed polls in articles #304

merged 2 commits into from
Dec 7, 2024

Conversation

rossta
Copy link
Contributor

@rossta rossta commented Dec 7, 2024

Some hacks to lazy create a poll within the content of an article. Uses some globally-accessible values like Page.primary_author and Current.page to access knowledge of key records with content rendering in a request and within atom feeds. Hacks and workarounds galore!

Creates the first poll from within the recent SQLite article

Workarounds required to reference current page from within article
content via Current.page and from within the atom feed.

Also no access to the request.key_generator from within feed article
rendering, so we check for presence.
Copy link

codecov bot commented Dec 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
app/controllers/site_controller.rb 100.00% <100.00%> (ø)
app/models/current.rb 100.00% <100.00%> (ø)
app/models/page.rb 100.00% <100.00%> (ø)
app/models/poll.rb 100.00% <100.00%> (ø)
app/views/share/polls/lazy_page_poll.rb 100.00% <100.00%> (ø)
app/views/share/polls/poll_component.rb 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@rossta rossta merged commit e2105ef into main Dec 7, 2024
11 checks passed
@rossta rossta deleted the feat/embed-polls-in-articles branch December 7, 2024 17:46
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.

1 participant