SslRequirement on Rails 2.0

Hi All,

I’m fairly new to RoR and I’m having trouble using the plugin
SslRequirement.

I have an ApplicationController which includes the SslRequirement as so:

class ApplicationController < ActionController::Base
include SslRequirement

I have another controller that inherits from ApplicationController

class ProductsController < ApplicationController

and within that I have some actions that will require ssl:

before_filter :ssl_required, :only => [ :buy, :show ]

When I try an view either the show or buy pages I get the error:

undefined method `ssl_required’ for #ProductsController:0x5771c58

Using public_methods I have done logged output of the controller’s
interface to see if the ssl_required method is available, it is not part
of the public interface. However using protected_methods I can see that
the ssl_required? and ssl_allowed? methods are available so it has
inherited correctly.

So, does anyone know why I might be experiencing this?

Thanks in advance

Adrian

I can however see in

Actually, I don’t have a clue, but maybe prepending “require
‘ssl_requirement’” to the particular file would do it.

What about using SSL for all pages? Would that be an potential
workaround?

SSL could been done by NGINX for instance:
http://wiki.codemongers.com/NginxHttpSslModule