Skip to content

Commit

Permalink
Fix nesquena#344 to avoid: "warning: default `to_a' will be obsolete"
Browse files Browse the repository at this point in the history
  • Loading branch information
nesquena committed Nov 7, 2012
1 parent e3170ff commit 853c36f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,8 @@

## 0.7.7 (unreleased)

* Fix #344 to avoid: "warning: default `to_a' will be obsolete"

## 0.7.6

* Fix render behavior by separating data_object and data_name in engine
Expand Down
2 changes: 1 addition & 1 deletion lib/rabl/engine.rb
Expand Up @@ -135,7 +135,7 @@ def collection(data, options={})
@_collection_name = options[:root] if options[:root]
@_collection_name ||= data.values.first if data.respond_to?(:each_pair)
@_object_root_name = options[:object_root] if options.has_key?(:object_root)
self.object(data_object(data).to_a)
self.object(Array(data_object(data)))
end

# Sets the cache key to be used by ActiveSupport::Cache.expand_cache_key
Expand Down

0 comments on commit 853c36f

Please sign in to comment.