repositor 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/repositor/active_record.rb +1 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 025d643d69da495aac7845e4883956df337637f5
|
4
|
+
data.tar.gz: 221bc1c11d9aaaadd9fab6cbdac45a466fe9a43e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: add4bbf1d341b89d56dbec5e01b31424dce4f8366d83d5e8bf02083b2ee57ff65f386c7366c34406562363ea10c380d8511eeed1c379fc86195082ab849b0f25
|
7
|
+
data.tar.gz: 0f3672f250c82572ee4f0cfa4cf263fcc27c4cb364936075ac3efc60c5d3327cb42e6e7b225250ea9377fedf9b685856cbbc5c9c84b67579481018919ee3a32e
|
@@ -5,7 +5,7 @@ module Repositor
|
|
5
5
|
module ActiveRecord
|
6
6
|
attr_reader :model
|
7
7
|
|
8
|
-
delegate :find, :all, :new, :create, :update, to: :model
|
8
|
+
delegate :find, :all, :new, :create, :update, :destroy, to: :model
|
9
9
|
|
10
10
|
def initialize(model: nil)
|
11
11
|
@model = model || self.class.to_s.chomp("Repo").singularize.constantize
|
@@ -21,10 +21,6 @@ module Repositor
|
|
21
21
|
model.new
|
22
22
|
end
|
23
23
|
|
24
|
-
def destroy(record)
|
25
|
-
record.destroy
|
26
|
-
end
|
27
|
-
|
28
24
|
def method_missing(method, *args)
|
29
25
|
return unless args[0].instance_of? model
|
30
26
|
|