acts_as_graph_object 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,7 +26,7 @@ module ActsAsGraphObject
26
26
  # standard object properties & alternative names
27
27
  default_properties = {
28
28
  :title => [:name, :label],
29
- :type => [:kind, :group, :class],
29
+ :type => [:kind, :group],
30
30
  :image => [:picture, :photo],
31
31
  :url => [:permalink, :link],
32
32
  :description => [:info, :details],
@@ -1,12 +1,11 @@
1
1
  module ActsAsGraphObject
2
2
  module ViewHelpers
3
- def graph_object_tags_for(object, options = {})
3
+ def graph_object_tags_for(object, overrides = {})
4
4
  raise "You need to add acts_as_graph_object to your #{object.class} model." unless object.respond_to?(:graph_properties)
5
5
  meta_tags = []
6
- object.graph_properties.each do |namespace, attributes|
6
+ # go through each namespace: :fb, :og & custom..
7
+ object.graph_properties.deep_merge(:og => overrides).each do |namespace, attributes|
7
8
  attributes.each do |property, values|
8
- # allow value overide from view..
9
- values = options[property] || values
10
9
  # in most cases 'values' will be a single value
11
10
  Array(values).each do |content|
12
11
  meta_tags << tag(:meta, :property => [namespace, property].join(':'), :content => content)
@@ -1,3 +1,3 @@
1
1
  module ActsAsGraphObject
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_graph_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: