simpleadmin 1.2.3 → 1.2.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e99cdb380006f15b9fd1984bcd3ef515dbc7a938
|
4
|
+
data.tar.gz: 5648457d8aa33e7e25160290609762c4d26ca2e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e76548b4c9b3a71daf4dd91101cd4b095356f53406f61730e727eb38c20b981f5faf5299e82ad4644677974910440edba8122186b8709122464a70646dec42e
|
7
|
+
data.tar.gz: bca47c1d1a2937231754d1e17996de32202569d1654907a1643dba3bcba9db2bb45fe30e32f64bc248b62e8b670e9e4089411aa5e404fba43158e19c71494317
|
@@ -18,6 +18,14 @@ module SimpleAdmin
|
|
18
18
|
render json: resource
|
19
19
|
end
|
20
20
|
|
21
|
+
def show_by
|
22
|
+
model_fields = params[:model_fields].map { |model_field| model_field['field_name'] }
|
23
|
+
|
24
|
+
resource = model_klass.find_by(params[:column_name] => params[:column_value] ).attributes.slice(*model_fields)
|
25
|
+
|
26
|
+
render json: resource
|
27
|
+
end
|
28
|
+
|
21
29
|
def create
|
22
30
|
resource = model_klass.new(resource_params)
|
23
31
|
|
data/lib/simpleadmin/routes.rb
CHANGED
data/lib/simpleadmin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simpleadmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Strukov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|