Cleanup contact_link helper
This commit is contained in:
parent
8e88f2c27f
commit
5d5a356ade
1 changed files with 4 additions and 5 deletions
|
@ -55,12 +55,11 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def contact_link(title, options = {})
|
||||
tags, type, dossier_id = options.values_at(:tags, :type, :dossier_id)
|
||||
options.except!(:tags, :type, :dossier_id)
|
||||
|
||||
if Flipflop.support_form?
|
||||
params = {
|
||||
tags: options[:tags],
|
||||
type: options[:type],
|
||||
dossier_id: options[:dossier_id]
|
||||
}.compact
|
||||
params = { tags: tags, type: type, dossier_id: dossier_id }.compact
|
||||
link_to title, contact_url(params), options
|
||||
else
|
||||
mail_to CONTACT_EMAIL, title,
|
||||
|
|
Loading…
Add table
Reference in a new issue