seorel 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efcaa09bd4ce13a6f01401e92a281fc3e5909828
4
- data.tar.gz: a1305abf9e9e5dbb8f58970ee09b321ed7ebb26b
3
+ metadata.gz: 92ba89393f12235236d43cb2ff0a786b78163de7
4
+ data.tar.gz: 264ff61d1cb97041071a7d12490833756285e5a3
5
5
  SHA512:
6
- metadata.gz: e10ff58ad0795b28654cbf3109a54dee0ac8b67e66bcc215e5cd42ecc51dd2e172d28668dcb660bdc477ecaaec76408f001a06082beba5573d4d45c971103d48
7
- data.tar.gz: c992544be338722cded68c717a741115db21368757bdbe533f115ad95b7210fa4e6282d371efec0e48792d2951da3e88253d5e1c0e62c60ce11ae9c5d1781b3c
6
+ metadata.gz: 6de15533b0cb9a5942180f3af60fe308f281f7bf04f7267d98a903ef1669b5fca129bec3a7da62b96ac6bd4b14ce39a39c8f2098a8c8d02b22019028f1a71f55
7
+ data.tar.gz: e79d041107245f3d3f016b4ab03762c29a8c8b32c31a1ef8e8b882191a8771015ac700429b0f1a5d5ee93f6347e9c3463463ac98db5042aa7e84a17d05a920ca
data/README.md CHANGED
@@ -12,7 +12,7 @@ Ruby on Rails SEO Metatags plugins for ActiveRecord models
12
12
  `Gemfile.rb`:
13
13
 
14
14
  ```ruby
15
- gem 'seorel', '~> 0.2.0'
15
+ gem 'seorel', '~> 0.2.2'
16
16
 
17
17
  # the edge version can be had using:
18
18
  # gem 'seorel', github: 'dalpo/seorel'
@@ -63,7 +63,7 @@ Edit `app/models/post.rb`:
63
63
  ```ruby
64
64
  class Post < ActiveRecord::Base
65
65
  extend Seorelify
66
- seorelify title: :customized_title, description: :description
66
+ seorelify(title: :customized_title, description: :description, image: :share_image)
67
67
 
68
68
  def customized_title
69
69
  "THE BLOG: #{self.title}"
@@ -1,5 +1,10 @@
1
1
  module Seorel
2
2
  module Helper
3
+ def seorel_locale
4
+ locale = (I18n.locale.to_s.size == 2) ? "#{I18n.locale}_#{I18n.locale}" : I18n.locale.to_s
5
+ "#{locale[0..1].downcase}_#{locale[3..4].upcase}"
6
+ end
7
+
3
8
  def render_meta_tags
4
9
  [render_title, render_description, render_open_graph, render_twitter_cards].join("\n").html_safe
5
10
  end
@@ -19,7 +24,7 @@ module Seorel
19
24
  content_tag(:meta, nil, property: 'og:title', content: seorel_params.title),
20
25
  content_tag(:meta, nil, property: 'og:description', content: seorel_params.description),
21
26
  content_tag(:meta, nil, property: 'og:image', content: seorel_params.image),
22
- content_tag(:meta, nil, property: 'og:locale', content: I18n.locale.to_s)
27
+ content_tag(:meta, nil, property: 'og:locale', content: seorel_locale)
23
28
  ].join("\n").html_safe
24
29
  end
25
30
 
@@ -1,3 +1,3 @@
1
1
  module Seorel
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seorel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Dal Ponte