has_response 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,14 +29,12 @@ module HasResponse
29
29
  end
30
30
 
31
31
  def format_response_value(value, with=nil)
32
- if value.nil?
33
- nil
34
- elsif value.is_a?(TrueClass) || value.is_a?(FalseClass) || value.is_a?(String) || value.is_a?(Symbol) || value.is_a?(Integer)
35
- value
32
+ if value.is_a?(ActiveRecord::Base)
33
+ with.nil? ? value.to_response : value.to_response_with(with)
36
34
  elsif value.is_a?(ActiveRecord::Relation) || value.is_a?(Array)
37
35
  format_response_collection(value, with)
38
36
  else
39
- with.nil? ? value.to_response : value.to_response_with(with)
37
+ value
40
38
  end
41
39
  end
42
40
 
@@ -1,3 +1,3 @@
1
1
  module HasResponse
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_response
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: