is there a way i can set up a base protocol to use
render :action => "myaction"
redirect_to :action => "myaction"
instead of calling
render :action => "myaction", :protocol => "https://"
redirect_to :action => "myaction", :protocol => "https://"
every time?
Simply use config.force_ssl = true in your environment configuration.
You can also selectively enable https depending on the current Rails environment. For example, you might want to keep HTTPS turned off on development, and enable it on staging/production.
Behind the scenes, Rails adds the awesome Rack::SSL Rack middleware to your application middleware stack. Rack::SSL automatically filters the request, redirects not-HTTPS requests to the corresponding HTTPS path and applies some additional improvements to make sure your HTTPS request is secure.