Been looking at different pages on google about using SSL on Rails 3. I have
been using ssl_requirement prior to Rails 3. Wondering if ssl_requirement
will still work on Rails 3 (anyone used)? Or whether to go the way of the
new router. If so, is there a way to tell it to just make everything ssl?
I have tried this code in my router but at lest in dev mode does not seem to
work. Curious what people are doing in actuality. I like ssl_requirement as
it made things pretty transparent.
MyApp::Application.routes.draw do
class SslConstraint
def self.matches?(request)
request.ssl?
end
end
scope :constraints => SslConstraint do
resources :user_sessions
resources :users
resources :practices
resources :password_resets
resources :home
# Other SSL routes go in here
end
end
AND alternatively:
resources :users, :constraints => { :protocol => "https" }
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.