rails_rad 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f1d9ea84898e58cbca83a41d04deead041e1b3b
4
- data.tar.gz: 50d09aedc5c25c7babfcc1cc3f3a8b0d4a42a92d
3
+ metadata.gz: 293e3bf2d73229b92a24aef89feafa7690e47753
4
+ data.tar.gz: dc6d4c717daee55917c93aaa573d748438c974d1
5
5
  SHA512:
6
- metadata.gz: 5a5daeff64e8b5719bf2980cf27349ef9fc26768086f92f9ef4e07e91605d9fddbf15e80ecb39b6e12f044799bc3e37932360076151b620a369264be21275bea
7
- data.tar.gz: 70904796f40c65db6665d4bd3e23fe0180936dabd3d6179ebb4ff0544bee8edab6178abc24ad1a822ef4eb607765067e803ab81f16123342817967e481b6cc15
6
+ metadata.gz: cafa13d81185590278aea264c2a3c96c9627e181c74f0f13ed171a3d3380216430e28a95763326964167f7bfae18ea2bddcec9de0e5abed7142f5f4d918dfb43
7
+ data.tar.gz: f1a7f37496911646907d34ec16e2ca5368757653c65145cc8ea9f22fe7c2215477ed047ac6228cacaa2cfafd3ee98dca39c37bac400d3f44d8c5de351b819687
@@ -22,7 +22,7 @@ module Controller
22
22
  def create
23
23
  @resource = resource_class.new(permitted_params)
24
24
  @resource.save
25
- respond_with @resource, location: collection_path
25
+ respond_with @resource, location: after_create_location
26
26
  end
27
27
 
28
28
  def show
@@ -38,17 +38,29 @@ module Controller
38
38
  def update
39
39
  @resource = load_resource
40
40
  @resource.update_attributes(permitted_params)
41
- respond_with @resource, location: collection_path
41
+ respond_with @resource, location: after_update_location
42
42
  end
43
43
 
44
44
  def destroy
45
45
  @resource = load_resource
46
46
  @resource.destroy
47
- respond_with @resource, location: collection_path
47
+ respond_with @resource, location: after_destroy_location
48
48
  end
49
49
 
50
50
  private
51
51
 
52
+ def after_create_location
53
+ collection_path
54
+ end
55
+
56
+ def after_destroy_location
57
+ collection_path
58
+ end
59
+
60
+ def after_update_location
61
+ collection_path
62
+ end
63
+
52
64
  def collection_scope
53
65
  resource_class
54
66
  end
@@ -1,3 +1,3 @@
1
1
  module RailsRad
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_rad
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-13 00:00:00.000000000 Z
11
+ date: 2016-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails