I want to have mixed https/http site.
Moreover I want have redirects from https to http(ie. after user login successfully it should redirect to root page at http).
Gems like:
<%= link_to "model", some_model %>
<%= link_to "edit model", edit_mode_url(model) %>
...
<%= link_to 'model', model %>
Use this gem:
https://github.com/retr0h/ssl_requirement
gem install ssl_requirement
Then to add ssl_required :new, :destroy #others actions
to your controllers.
If you use devise you have to overwrite each controller and specify all actions
devise_for :users, :controllers => { :confirmations => "confirmations", :omniauth_callbacks => "omniauth_callbacks", :passwords => "passwords", :registrations => "registrations", :sessions => "sessions", :unlocks => "unlocks" } do
# etc
end
It works with Rails 3.0.x