EFForg / action-center-platform

The EFF Action Center Platform
GNU Affero General Public License v3.0
452 stars 61 forks source link

Redirect unrecognized institutions to the main action page #148

Open vbrown608 opened 8 years ago

vbrown608 commented 8 years ago

When a user attempts to filter by an institution that doesn't exist, ex. act.eff.org/action/reclaim-invention/foo, they should be redirected to the unfiltered action.

NeimadTL commented 6 years ago

Hi @vbrown608 @k-stewart , I'm a newcomer on this project, haven't forked it yet and still new to ruby and rails but I'd like to do some work. Does this feature consist in redirecting to ActionPageController#index if the institution record is not found here ? https://github.com/EFForg/action-center-platform/blob/24a100c62ec1bcf24a3ed642f17a1cbc9431d6be/app/controllers/action_page_controller.rb#L64

vbrown608 commented 6 years ago

Hi @NeimadTL - thanks for your interest in the project!

Admins can create special petitions where users can sign on behalf of an institutions like a university. Users who visit the petition can then see a list of all the signatures for that university at a special url. Here's an example: https://act.eff.org/action/tell-your-university-don-t-sell-patents-to-trolls/university-of-arizona

If a user visits, for a example, https://act.eff.org/action/tell-your-university-don-t-sell-patents-to-trolls/not-a-real-university, we should redirect them to https://act.eff.org/action/tell-your-university-don-t-sell-patents-to-trolls

So, rather than redirecting to ActionPageController#index, we should use ActionPageController#show for that ActionPage, but without the institution parameter.

NeimadTL commented 6 years ago

Hi @vbrown608 ,

thank you for your explanation. However, I'm having trouble getting the application running with docker. Where do I get secret_key_base= and devise_secret_key= please ?