How to redirect to follow-up with selection of custom state?

2 views
Skip to first unread message

Miroslav (Code for Croatia, ImamoPravoZnati.org)

unread,
Mar 11, 2023, 1:57:05 PM3/11/23
to Alaveteli Dev
Hi all,
I've added few custom states to ImamoPravoZnati.org theme and for one specific state I need to redirect user to the followup form - same as what is done when user selects "Withdrawn" state from classification box.

My code so far:

New status is "correction_requested" by which user asks authority to provide corrected response. The due date is reset from that point.

Based on:

I assume it should be something along lines:

# Redirect user on select Correction Asked to the new outgoing message
    if @info_request.calculate_status == 'correction_asked'
      redirect_to respond_to_last_url(@info_request)
    end


What would be the correct implementation for this? Should it go to model_patches or controller _patches?

Cheers,
Miroslav

Miroslav Schlossberg

unread,
Mar 14, 2023, 3:20:43 PM3/14/23
to alavet...@googlegroups.com
Hi,
Just to follow up - I managed to get it working, maybe not nice, but it's still working :)

Code:

Best regards,
Miroslav

-- 
Q: Why is this email [hopefully] three sentences or less?



Code for Croatia brine o zaštiti Vaše privatnosti. Molimo vas da ograničite dijeljenje svojih osobnih podataka putem elektroničke pošte.
Vodite računa o okolišu. Ne tiskajte ovu poruku ako nije neophodno.

--
You received this message because you are subscribed to a topic in the Google Groups "Alaveteli Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alaveteli-dev/PKK0yTvSS7M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alaveteli-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alaveteli-dev/67adcfed-d135-4a1f-9250-f25b36a8c817n%40googlegroups.com.

Code for Croatia brine o zaštiti Vaše privatnosti. Molimo vas da ograničite dijeljenje svojih osobnih podataka putem elektroničke pošte.
Vodite računa o okolišu. Ne tiskajte ovu poruku ako nije neophodno.
Reply all
Reply to author
Forward
0 new messages