rao-resources_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: ba8306731f961a258cb7386222212040eeff74c0e21381ef11c3b63af05a2ccb
4
- data.tar.gz: 908880b4ce3166d83600c87b5aa88103c25178f283fe8806f904ac8ccb3f3b57
3
+ metadata.gz: 374e559ddc58fda50a868d43846d5ebbd0b193e8c2bd573850a4bb112d70ef6f
4
+ data.tar.gz: 3743e7a81b9b37af6dc5f6a5e751eea13282ce56c7ca58b15568f99898e4a5af
5
5
  SHA512:
6
- metadata.gz: 3d9534e828c58922739946791fb462ed66721ee557a036037358cf0ec9b2245feb7d9baff36b05e8435d0aa8a4a72f1c7f77c5005b1e53b6543b02382ee27810
7
- data.tar.gz: 51538323e4d3d064f00fbd10e51198594b4091c81097372afced77a458a1b57d9d56ab9bc9db38a6c7dd79e6b817d7b11eeb75e1d60618da800ebdf82d13d1ad
6
+ metadata.gz: 150f368edd989fd1b9000f43295be2f8ec6243cb36457cdbcd8b74b52ec540c355b3abb05cea48a4bbb7cf5c9882fbc69f415fcd652972958f3efa39382cb4cb
7
+ data.tar.gz: 13a761d45f38b8fac1673934c919ac268d17d7fbcc8a495895f7d15d0f391c58fa596bfe292439e2322378f66d1ae0c469d5bfba82a7f3be0f5c9bec3339b89a
@@ -21,6 +21,8 @@ module Rao
21
21
  before_filter :initialize_resource, only: [:new]
22
22
  before_filter :initialize_resource_for_create, only: [:create]
23
23
  end
24
+
25
+ helper_method :resource_namespace
24
26
  end
25
27
 
26
28
  class_methods do
@@ -38,26 +40,26 @@ module Rao
38
40
 
39
41
  def update
40
42
  if @resource.send(update_method_name, permitted_params) && respond_to?(:after_update_location, true) && after_update_location.present?
41
- respond_with(respond_with_namespace, @resource, location: after_update_location)
43
+ respond_with(resource_namespace, @resource, location: after_update_location)
42
44
  else
43
- respond_with(respond_with_namespace, @resource)
45
+ respond_with(resource_namespace, @resource)
44
46
  end
45
47
  end
46
48
 
47
49
  def destroy
48
50
  @resource.destroy
49
51
  if respond_to?(:after_destroy_location, true) && after_destroy_location.present?
50
- respond_with(respond_with_namespace, @resource, location: after_destroy_location)
52
+ respond_with(resource_namespace, @resource, location: after_destroy_location)
51
53
  else
52
- respond_with(respond_with_namespace, @resource)
54
+ respond_with(resource_namespace, @resource)
53
55
  end
54
56
  end
55
57
 
56
58
  def create
57
59
  if @resource.save && respond_to?(:after_create_location, true) && after_create_location.present?
58
- respond_with(respond_with_namespace, @resource, location: after_create_location)
60
+ respond_with(resource_namespace, @resource, location: after_create_location)
59
61
  else
60
- respond_with(respond_with_namespace, @resource)
62
+ respond_with(resource_namespace, @resource)
61
63
  end
62
64
  end
63
65
 
@@ -67,7 +69,7 @@ module Rao
67
69
  Rails::VERSION::MAJOR < 4 ? :update_attributes : :update
68
70
  end
69
71
 
70
- def respond_with_namespace
72
+ def resource_namespace
71
73
  nil
72
74
  end
73
75
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-resources_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
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  - !ruby/object:Gem::Version
151
151
  version: 1.3.1
152
152
  requirements: []
153
- rubygems_version: 3.0.2
153
+ rubygems_version: 3.0.3
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Resources Controllers for Ruby on Rails.