rao-resource_controller 0.0.13.pre → 0.0.14.pre

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
  SHA256:
3
- metadata.gz: 609d38240914ca0d18bcabf1e5d3dd89f3ef5a21a3ee472682fccbea58796c82
4
- data.tar.gz: ebe6b7184a94bb72e4f4a0d1756123cec5b9dc34649e2c4ad0c90c8174daf541
3
+ metadata.gz: aaa818d0535caa44981afbcc3b57da100f07237fe0321b25c1d82b9e4b20e80c
4
+ data.tar.gz: 6f1b6a55162706ea5be019962f4b34b513fcfe17611d7f33247f3c422f977356
5
5
  SHA512:
6
- metadata.gz: 51b8c387fbce5cd7936a950c854eefc07e6a48c1c1b37ff1143e820d690439b54a0a7ae4bee8b6716e9755780c7dc77c7c7050c69d88e8b2a7e2e32100557b15
7
- data.tar.gz: e28cbbabc3cab6a048309be780ff5a875b82ca8f714164dd67b0c697e33d23c0c873d1573ab06169b1ab192de43ec4f133177b84d670d7d4159dfeef968659d8
6
+ metadata.gz: ae880e7cd89c4fbaf43d245b707a920a0d93be07951eb595a038b91b7a61d268afacd4277e737fe9c7c5158f1313f1deeccc53a5f3a8db31c9e4c28737ce99ef
7
+ data.tar.gz: f6ecb46b66ac735210c43b59db34f3258ce154bcc6cc1d5e1c0cbd06d698d13a6e996b02583fcb8c8d08deb5df73ab6a2deb30b4cf02c99c06488bd9db954fee
@@ -18,6 +18,8 @@ module Rao
18
18
  before_filter :initialize_resource, only: [:new]
19
19
  before_filter :initialize_resource_for_create, only: [:create]
20
20
  end
21
+
22
+ helper_method :resource_namespace
21
23
  end
22
24
 
23
25
  def new; end
@@ -26,26 +28,26 @@ module Rao
26
28
 
27
29
  def update
28
30
  if @resource.send(update_method_name, permitted_params) && respond_to?(:after_update_location, true) && after_update_location.present?
29
- respond_with(respond_with_namespace, @resource, location: after_update_location)
31
+ respond_with(resource_namespace, @resource, location: after_update_location)
30
32
  else
31
- respond_with(respond_with_namespace, @resource)
33
+ respond_with(resource_namespace, @resource)
32
34
  end
33
35
  end
34
36
 
35
37
  def destroy
36
38
  @resource.destroy
37
39
  if respond_to?(:after_destroy_location, true) && after_destroy_location.present?
38
- respond_with(respond_with_namespace, @resource, location: after_destroy_location)
40
+ respond_with(resource_namespace, @resource, location: after_destroy_location)
39
41
  else
40
- respond_with(respond_with_namespace, @resource)
42
+ respond_with(resource_namespace, @resource)
41
43
  end
42
44
  end
43
45
 
44
46
  def create
45
47
  if @resource.save && respond_to?(:after_create_location, true) && after_create_location.present?
46
- respond_with(respond_with_namespace, @resource, location: after_create_location)
48
+ respond_with(resource_namespace, @resource, location: after_create_location)
47
49
  else
48
- respond_with(respond_with_namespace, @resource)
50
+ respond_with(resource_namespace, @resource)
49
51
  end
50
52
  end
51
53
 
@@ -55,7 +57,7 @@ module Rao
55
57
  Rails::VERSION::MAJOR < 4 ? :update_attributes : :update
56
58
  end
57
59
 
58
- def respond_with_namespace
60
+ def resource_namespace
59
61
  nil
60
62
  end
61
63
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-resource_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13.pre
4
+ version: 0.0.14.pre
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: 2019-03-19 00:00:00.000000000 Z
11
+ date: 2019-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rao
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: 1.3.1
126
126
  requirements: []
127
- rubygems_version: 3.0.2
127
+ rubygems_version: 3.0.3
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Singular Resource Controllers for Ruby on Rails.