Sha256: 88f077176c628626e8af5b23714085cf9fec4292b9d60b573314a693687975a3

Contents?: true

Size: 517 Bytes

Versions: 28

Compression:

Stored size: 517 Bytes

Contents

module Workarea
  module SchemaOrgHelper
    def render_schema_org(schema)
      tag.script(schema.to_json.html_safe, type: 'application/ld+json')
    end

    def email_action_schema(target, name, description = nil)
      {
        '@context': 'http://schema.org',
        '@type': 'EmailMessage',
        'potentialAction': {
          '@type': 'ViewAction',
          'target': target,
          'url': target,
          'name': name
        },
        'description': description || name
      }
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-core-3.5.27 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.26 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.25 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.23 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.22 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.21 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.20 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.19 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.18 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.17 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.16 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.15 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.14 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.13 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.12 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.11 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.10 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.9 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.8 app/helpers/workarea/schema_org_helper.rb
workarea-core-3.5.7 app/helpers/workarea/schema_org_helper.rb