Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made it 1.9.2 compatible (Struct.members returns symbols instead of s…

…trings in 1.9)
  • Loading branch information...
commit a6695b7bff45136fe0085d4dcd6dd4d74c9bfd73 1 parent 521027f
Johan Vermeulen authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rich/cms/content/group.rb
View
4 lib/rich/cms/content/group.rb
@@ -5,7 +5,7 @@ module Content
class Group < Struct.new(:selector, :tag, :class_name, :key, :value, :add, :before_edit, :after_update)
def self.build(selector, specs)
- self.new *{:selector => selector, :key => :key, :value => :value}.merge(specs).stringify_keys.values_at(*self.members)
+ self.new *{:selector => selector, :key => :key, :value => :value}.merge(specs).stringify_keys.values_at(*self.members.map(&:to_s))
end
def fetch(ref, as_content_item = true)
@@ -38,7 +38,7 @@ def to_javascript_hash
members.collect do |k|
if v = self[k]
case k
- when "key"
+ when "key".to_s
"keys: [#{
[v].flatten.collect do |key|
"data-#{key}".inspect
Please sign in to comment.
Something went wrong with that request. Please try again.