Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module SslRequiredEverywhere
- def ssl_required_everywhere(options = {})
- if options[:environments].nil? || options[:environments].map(&:to_s).include?(Rails.env)
- include SslRequirement
- define_method(:ssl_required?) { true }
- else
- def ssl_required(*args)
- # do nothing
- end
- define_method(:ssl_required?) { false }
- end
- end
- end
Add Comment
Please, Sign In to add comment