rest_area 2.0.0 → 2.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e8eafe9476bbb11ea8d35670e7c04fa4d00fe1a
4
- data.tar.gz: 189aca44997b83a548bacff763d2b766fe953852
3
+ metadata.gz: eb28d86bdd602208f1527f32af1b11dc054972cf
4
+ data.tar.gz: a5f330b83c1324289d45d4750e1b91523b3ea7fb
5
5
  SHA512:
6
- metadata.gz: a386cbaabf1f1c0afd3649372b5e1ecea5ee83774cdb7d43deb84de0e6375da643140a6cdca2eed193d7e844c291e433ea2382695847ed5c94130d9e560dc7b9
7
- data.tar.gz: 6665be2ee5be3c856ec171e480f05435a5f67bc5c46e0e162e0df4281c86aaa651a1c89d84e1202c37af3d0cbf0591cc6456c643bd5b01c768e8d973b6b3419e
6
+ metadata.gz: 63b603f71211945f94190d49e946a74b5f3beef224d54c9186e4a8342e7a21178d74be9a4ed744020ad1cda57823c4d1c24fa1d713d118d15e8549298d6daf8a
7
+ data.tar.gz: e8c21ec3753a9494f1cf36787a46a20f2780247471ea32ff8d15f8f1815025a247a4c30af04259ef1bf272fc89586075da95ebfa7624ed9b3b8e8e109dbc9846
data/README.md CHANGED
@@ -30,3 +30,10 @@ If you are using Rails 4.1.x you should use the master branch and/or versions/ta
30
30
 
31
31
  mount RestArea::Engine => "/your_base_route"
32
32
 
33
+ # Serializers
34
+
35
+ But what if I want to customize the JSON that comes back? Simple this
36
+ gem supports [active_model_serializer][1]. Go there, ignore the stuff
37
+ about controllers.
38
+
39
+ [1]:https://github.com/rails-api/active_model_serializers
@@ -58,7 +58,7 @@ module RestArea
58
58
  end
59
59
 
60
60
  def klass_params
61
- params.require(@root.to_sym).permit(@klass.column_names.map(&:to_sym))
61
+ params.require(@root.to_sym).permit!
62
62
  end
63
63
 
64
64
  def set_class_serializer
@@ -77,7 +77,7 @@ module RestArea
77
77
  raise ActionController::RoutingError.new("Resource Does Not Exist")
78
78
  end
79
79
 
80
- @roots = ActionController::Base.helpers.sanitize(params[:klass])
80
+ @roots = ActionController::Base.helpers.sanitize(params[:klass]).pluralize
81
81
  @root = @roots.singularize
82
82
  end
83
83
 
@@ -1,3 +1,3 @@
1
1
  module RestArea
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_area
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Guest
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-30 00:00:00.000000000 Z
11
+ date: 2014-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails