Commit af154478 authored by Marin Jankovski's avatar Marin Jankovski

Create emails helper for actions links.

parent 8dc9cb3d
module EmailsHelper
# Google Actions
# https://developers.google.com/gmail/markup/reference/go-to-action
def email_action(options)
data = {
"@context" => "http://schema.org",
"@type" => "EmailMessage",
"action" => {
"@type" => "ViewAction",
"name" => options[:name],
"url" => options[:url],
}
}
content_tag :script, type: 'application/ld+json' do
data.to_json.html_safe
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment