2

I'm trying to create a link to a page that requires ssl, and the routes are properly set up to require it to be https, but I can't figure out how to get link_to to behave properly. I've tried writing it like this, but when I click on the link it still tries to go to an http page, not the https page like I'd expect. Am I doing something wrong?

link_to "Schedule a Visit!", :controller => 'visits', 
                             :action => 'new', 
                             :protocol => "https"

For reference, this is the appropriate part in my routes.rb:

scope :constraints => {:protocol => "https"} do
    resources :visits, :only => [:new, :create]
end
iand675
  • 1,118
  • 1
  • 11
  • 23

1 Answers1

1

See this:

Rails 3 SSL Deprecation

Community
  • 1
  • 1
Fábio Batista
  • 25,002
  • 3
  • 56
  • 68