rest_framework 0.11.0 → 1.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rest_framework/mixins/model_controller_mixin.rb +9 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4261d5bdf6f4e59ffce35b2a5f36bafe104bddd9b9437f34b77b495acbeefac6
|
4
|
+
data.tar.gz: 84f0213bfd2d54777059049b87b84f2ff4c727c45838c130ec7382b5d1aa451c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d2308561ba8ae8668f2e3fd83da4487d1b9ba3b4ca632c1be21fe6bfbf5cb88b8f0a661624dc97a837473263ae944a1231ef7c8b90284d8851b275780326886
|
7
|
+
data.tar.gz: 030d5acc028ae343486c30968c66b25ab91d5577a48f236ccf4766ee8675b75c1f83ca8cb3f442dd9a0be93209142acd1aa4ba7d5cfd7c318521bbdc91cb986b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0.beta1
|
@@ -349,9 +349,9 @@ module RESTFramework::Mixins::BaseModelControllerMixin
|
|
349
349
|
model = self.class.get_model
|
350
350
|
|
351
351
|
if model.method(action).parameters.last&.first == :keyrest
|
352
|
-
|
352
|
+
render_api(model.send(action, **params))
|
353
353
|
else
|
354
|
-
|
354
|
+
render_api(model.send(action))
|
355
355
|
end
|
356
356
|
end
|
357
357
|
end
|
@@ -365,9 +365,9 @@ module RESTFramework::Mixins::BaseModelControllerMixin
|
|
365
365
|
record = self.get_record
|
366
366
|
|
367
367
|
if record.method(action).parameters.last&.first == :keyrest
|
368
|
-
|
368
|
+
render_api(record.send(action, **params))
|
369
369
|
else
|
370
|
-
|
370
|
+
render_api(record.send(action))
|
371
371
|
end
|
372
372
|
end
|
373
373
|
end
|
@@ -691,7 +691,7 @@ end
|
|
691
691
|
# Mixin for listing records.
|
692
692
|
module RESTFramework::Mixins::ListModelMixin
|
693
693
|
def index
|
694
|
-
|
694
|
+
render_api(self.get_index_records)
|
695
695
|
end
|
696
696
|
|
697
697
|
# Get records with both filtering and pagination applied.
|
@@ -719,14 +719,14 @@ end
|
|
719
719
|
# Mixin for showing records.
|
720
720
|
module RESTFramework::Mixins::ShowModelMixin
|
721
721
|
def show
|
722
|
-
|
722
|
+
render_api(self.get_record)
|
723
723
|
end
|
724
724
|
end
|
725
725
|
|
726
726
|
# Mixin for creating records.
|
727
727
|
module RESTFramework::Mixins::CreateModelMixin
|
728
728
|
def create
|
729
|
-
|
729
|
+
render_api(self.create!, status: :created)
|
730
730
|
end
|
731
731
|
|
732
732
|
# Perform the `create!` call and return the created record.
|
@@ -738,7 +738,7 @@ end
|
|
738
738
|
# Mixin for updating records.
|
739
739
|
module RESTFramework::Mixins::UpdateModelMixin
|
740
740
|
def update
|
741
|
-
|
741
|
+
render_api(self.update!)
|
742
742
|
end
|
743
743
|
|
744
744
|
# Perform the `update!` call and return the updated record.
|
@@ -753,7 +753,7 @@ end
|
|
753
753
|
module RESTFramework::Mixins::DestroyModelMixin
|
754
754
|
def destroy
|
755
755
|
self.destroy!
|
756
|
-
|
756
|
+
render_api("")
|
757
757
|
end
|
758
758
|
|
759
759
|
# Perform the `destroy!` call and return the destroyed (and frozen) record.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory N. Schmit
|
@@ -99,9 +99,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: 2.3.0
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - ">"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
104
|
+
version: 1.3.1
|
105
105
|
requirements: []
|
106
106
|
rubygems_version: 3.4.10
|
107
107
|
signing_key:
|