class SecureLink::Link
Public Instance Methods
link_to_secured(name, options = {}, html_options = nil)
click to toggle source
# File lib/secure_link/link.rb, line 3 def link_to_secured(name, options = {}, html_options = nil) url = url_for(options) check_url = url unless ENV["RAILS_RELATIVE_URL_ROOT"].blank? check_url = check_url.gsub(ENV["RAILS_RELATIVE_URL_ROOT"], "") end method = html_options ? html_options[:method] : nil if authorized?(check_url, method) return link_to_open(name, url, html_options) end return "" end