0

I am trying to force SSL only on specific URLs (user account settings in this case), and I saw this: Rails 3 SSL Deprecation . This is my original routes:

resources :users do
  collection do
    get :thanks
    get :change_password
    get :settings
  end
end

I changed it to this after reading that answer;

resources :users do
  scope :constraints => { :protocol => 'https' } do
    collection do
      get :thanks
      get :change_password
      get :settings
    end
  end
end

But now lets say when I try to go on the settings page, I get an error for The action 'show' could not be found for UsersController when it's actually supposed to be processed by User#settings. What am I doing wrong?

Community
  • 1
  • 1
bigpotato
  • 26,262
  • 56
  • 178
  • 334

1 Answers1

0
scope :constraints => { :protocol => 'https' } do
  resources :users do
    collection do
      get :thanks
      get :change_password
      get :settings
    end
  end
end

scope first. I think...

Heungju Kim
  • 120
  • 6