-
Notifications
You must be signed in to change notification settings - Fork 591
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
Add Redirect For Requests For The Current Term Of Alerts #5805
base: master
Are you sure you want to change the base?
Add Redirect For Requests For The Current Term Of Alerts #5805
Conversation
What if we try to make a campaign with the slug |
Hello @ragesoss , I need to check about the validation. |
Hello @ragesoss , One can But also, how to keep these 2 objects in synch ? We would need to add a hook on save/update on Campaign, check if it is about the current campaign, and if so, proceed to update current.slug Campaign. In my opinion, this is a bit heavy. |
@cyrillefr i was thinking that we should just use a validation on the Campaign model to make sure we never have an actual campaign with the slug |
Aaaah :) |
Checks failed at linting stage. But for a source file version that is not part of my branch .... |
My fault. I added that linting violation while fixing an urgent but last week. Don't worry about that failure. |
- One can now bookmark: - /campaigns/current/alerts and/or - /campaigns/current/alerts.json - a new route rule to go to - the new current_alerts method in the Campaing controller - that is inspired by the alerts method - show method modified bc React calls some campaign/slug.json - whether in html or json format. - slug when value current has to be interpolated right - the corresponding spec
- slug cannot be assigned name "current"
64d4185
to
37064b2
Compare
What this PR does
This PR aims to close #5800
/campaigns/current/alerts
and/or/campaigns/current/alerts.json
With a new route rule to go to the new
current_alerts
method in theCampaign
controller.Inspired by the
alerts
method from same controller.The
show
method had to be modified because React calls somecampaign/slug.json
after populating with someother calls. Whether in html or json format.
So the
current
has to be interpolated to the real current CampaignCurrent is the same as default
Open questions and concerns
I believe one could add also this bookmark:
http://domain/campaigns/current/programs
quite easily