Yes, use the secure_actions plugin, which based on ssl_requirement:
With that plugin you can configure SSL per action, and is integrated with URL generation.
There's a couple of things to note about it. There's no API to configure an entire controller as secure. I solved that with this class method:
# A controller makes this call to declare all their actions run behind SSL.
# The call must be put at the bottom of the code, so that the public methods
# are known and returned by public_instance_methods.
The other thing is that the plugin as of revision 14 expects explicit controllers and actions in your calls to url_for (via link_to or whatever). It looks up the pair in a table to figure out whether it needs to select "https" as protocol. The attached patch fixes that.
secure_actions.patch (948 Bytes)