DavidB
2008-Jul-20 17:17 UTC
ssl requirement plugin: exempting a couple of actions from ssl
I am wondering the cleanest way to selectively enforce SSL. Say I have an application with 10 controllers, each with 5 actions. I want SSL on all actions except for 2. Rather than having ''ssl_required :action1, :action2, :action3, etc'' in each controller, I thought, the best way would be to put it in the application.rb file. by modifying def ssl_required? call. My solution was to look for certain action names in the request object using Ruby String class functions, but I would be surprised if there was not an easier way to just using something. Thanks. David --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---