lib/active_remote/serializers/json.rb in active_remote-1.5.0 vs lib/active_remote/serializers/json.rb in active_remote-1.5.1
- old
+ new
@@ -2,9 +2,11 @@
module Serializers
module JSON
# Returns a json representation of the whitelisted publishable attributes.
#
def as_json(options = {})
+ options ||= {}
+
default_options = { :only => _publishable_json_attributes, :methods => _publishable_json_methods }
default_options.merge!(options)
super(default_options)
end