apiql 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -20
- data/apiql.gemspec +1 -1
- data/lib/apiql.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b3367a06a548400e896870b2ce839e0d9b7960f13d55c6866582116142c2509
|
|
4
|
+
data.tar.gz: 1c11a0bd1f46bca6fe5c618b6c60d205f43363b4aef8694a604dfb5e9bccb850
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd0880c6f59a8bc2075a721792af43b54021ba26b1260ba61c1a0eef8a8e1fc2c7f2700bdd91b36e1dba915725ae55ed6e7afbc74e23b68c22d53021a571d2f7
|
|
7
|
+
data.tar.gz: 882ba98a1f431518d7f648cd536f3206fff70b5ca2a309941e28c9d8cc77d76b6908e44cf2402936df1ad194ec8e327364cbc121a23746ba0904e5503d16ab14
|
data/README.md
CHANGED
|
@@ -157,26 +157,6 @@ class APIQL
|
|
|
157
157
|
end
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
and even authorize access to every entity:
|
|
161
|
-
|
|
162
|
-
```ruby
|
|
163
|
-
class ApplicationRecord < ActiveRecord::Base
|
|
164
|
-
class BaseEntity < APIQL::Entity
|
|
165
|
-
def initialize(object, context)
|
|
166
|
-
context.authorize! :read, object
|
|
167
|
-
super(object, context)
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
class User < ApplicationRecord
|
|
173
|
-
class Entity < BaseEntity
|
|
174
|
-
...
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
|
|
180
160
|
you can add CRUD methods for your models:
|
|
181
161
|
|
|
182
162
|
```ruby
|
data/apiql.gemspec
CHANGED
data/lib/apiql.rb
CHANGED