Workaround for subfolder controllers #4

jinixdme opened this Issue Jul 4, 2011 · 0 comments

1 participant


ssl_requirement's ssl_required doesn't work for "subfolder controllers", eg class Text::WriteController < ApplicationController ... located at /app/controllers/text.

Instead of using (sample for def index and def create):

ssl_required :index, :create

you can use this as a workaround:

def ssl_required?
return true if %w{index create}.any? {|a| a == params[:action]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment