pdns 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/pdns/records_controller.rb +6 -3
- data/lib/pdns/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 203a53d5363539e9fd4147cbbd88401c2f8e5683
|
4
|
+
data.tar.gz: 191ec0a2e5e9d2e64adefa5602276a710b0ada86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df323e88b51de7f93df6eb5366fd8b93e7a41511b786b6c1b1e9baa077ea0638fdb27fbb97f9041f3074b840d7aa1336f64011df57e3ba6fe6295dbfa655a71b
|
7
|
+
data.tar.gz: c99b81265841b35bf879049cc7b9dce21a6338f0d5188bb426343317ec5d17f585362022d5fd3b22430fe6e1297ef12e7283453207e17c6ba97e4b8f211fc1f0
|
@@ -62,10 +62,8 @@ module PDNS
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def set_record
|
65
|
-
|
66
|
-
permitted[:name] = permitted.delete :id
|
65
|
+
record = @domain.records.where(record_params_with_id_to_name)
|
67
66
|
|
68
|
-
record = @domain.records.where(permitted)
|
69
67
|
raise ActiveRecord::RecordNotFound.new(
|
70
68
|
"record not found"
|
71
69
|
) if record.empty?
|
@@ -73,6 +71,7 @@ module PDNS
|
|
73
71
|
raise ActiveRecord::ActiveRecordError.new(
|
74
72
|
"record not unique"
|
75
73
|
) unless record.one?
|
74
|
+
|
76
75
|
@record = record.first
|
77
76
|
end
|
78
77
|
|
@@ -80,6 +79,10 @@ module PDNS
|
|
80
79
|
(params[:record] || params).permit %i(name type content ttl prio auth)
|
81
80
|
end
|
82
81
|
|
82
|
+
def record_params_with_id_to_name
|
83
|
+
record_params.merge(name: params[:id])
|
84
|
+
end
|
85
|
+
|
83
86
|
def delete_records
|
84
87
|
params['before_delete_conditions'].each do |condition|
|
85
88
|
condition.each { |k, v| @domain.records.where(k => v).destroy_all }
|
data/lib/pdns/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- linyows
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|