SslRequirement module

R

Ryan Sobol

This is a question is about the SslRequirement rails plugin. However,
it's also about core concepts behind ruby modules.

Here's the code for the plugin.

http://pastie.caboo.se/73773

Here's an example of how you use it.

http://pastie.caboo.se/73774

I've used this plugin all over the place in my app. But now, I want
to do some performance testing on the app WITHOUT using https (mainly
because I don't have control over port 443 on the test machine).
Ideally, I want to add a toggle variable to the module that I can set
from an environment file or application_controller if I must. What I
don't want to do is go around the app and comment out all my
ssl_required statements.

I'm at a loss as where to inject this toggle, and whether it should be
a class variable or class instance variable or maybe something
completely different. Any and all advice is welcome.

--RYAN

PS - Yes, I've double posted this in the rails talk and ruby
discussion groups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top