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
|
end
|
||||||
|
|
||||||
def contact_link(title, options = {})
|
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?
|
if Flipflop.support_form?
|
||||||
params = {
|
params = { tags: tags, type: type, dossier_id: dossier_id }.compact
|
||||||
tags: options[:tags],
|
|
||||||
type: options[:type],
|
|
||||||
dossier_id: options[:dossier_id]
|
|
||||||
}.compact
|
|
||||||
link_to title, contact_url(params), options
|
link_to title, contact_url(params), options
|
||||||
else
|
else
|
||||||
mail_to CONTACT_EMAIL, title,
|
mail_to CONTACT_EMAIL, title,
|
||||||
|
|
Loading…
Reference in a new issue