rest_rails 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/rest_rails/application_helper.rb +2 -4
- data/lib/rest_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bbf6117c22067039afe036aba247c3f20ac9ba930e3d1140349e70aaaf67d01
|
4
|
+
data.tar.gz: 88f538adec8d1fd23e67462434fd0845b511777313e30291937c6f89910a51a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9edb560515e507117c98bab2b05d483ab0a0e9455ead8bc820a9ab6d66d608d62dd8c6e8f640e8cac4f7d3e02a2943edb8ce258136659bb999c4a8173478a254
|
7
|
+
data.tar.gz: d8758148705b26ce8d1dbcf5cce5c55d501ddc326e417b2a19c65aab8165ddf7994a32bb949de530cd307fdfc5d3185f1af14a10064df937eaf5c601c93a70b2
|
@@ -87,11 +87,9 @@ module RestRails
|
|
87
87
|
# ==========================================================================
|
88
88
|
|
89
89
|
def model_for(table_name)
|
90
|
-
|
91
|
-
"schema_migrations", "ar_internal_metadata"]
|
92
|
-
tables = ActiveRecord::Base.connection.tables.reject{ |x| ignored.include?(x) }
|
90
|
+
tables = ActiveRecord::Base.descendants.reject(&:abstract_class).index_by(&:table_name)
|
93
91
|
|
94
|
-
raise RestRails::Error.new "Table '#{table_name}' does not exist in your database!" unless tables.include?(table_name)
|
92
|
+
raise RestRails::Error.new "Table '#{table_name}' does not exist in your database!" unless tables.keys.include?(table_name)
|
95
93
|
|
96
94
|
# Take the tablename, and make the Model of the relative table_name
|
97
95
|
table_name.classify.constantize # "users" => User
|
data/lib/rest_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Rivas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|