lib/roar/rails/json_api.rb in roar-rails-1.0.1 vs lib/roar/rails/json_api.rb in roar-rails-1.0.2
- old
+ new
@@ -3,5 +3,10 @@
Roar::JSON::JSONAPI.class_eval do
def to_json_api(*args); to_json(*args); end
def from_json_api(*args); from_json(*args); end
end
+# allow the same for collections.
+Roar::JSON::JSONAPI::Document::Collection.class_eval do
+ def to_json_api(*args); to_json(*args); end
+ def from_json_api(*args); from_json(*args); end
+end