Question

I found that AJAX calls were not working on my Rails site when a page was using SSL/HTTPS. I worked around this by adding

ssl_allowed :action1, :action2, :actionN

to the controllers involved.

I foresee this being a pain and prone to bugs in the future, as I'll indubitably forget to add an action to the ssl_allowed list.

Is there a way to turn on ssl_allowed/ssl_required globally in the [ssl_requirement][1] gem, for all actions of every controller in my site? I tried adding the following to ApplicationController, but that did not work:

ssl_allowed :all

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top