Separated 'pattern' and 'type' properties in DNS model.

This will expose the resource type to the RESTful API (coming soon).
This commit is contained in:
soh_cah_toa
2013-05-16 23:14:29 -04:00
parent 6d2a771084
commit 24f7e5b6cd
2 changed files with 6 additions and 4 deletions

View File

@@ -14,9 +14,10 @@ module DNS
storage_names[:default] = 'extension_dns_rules'
property :id, Serial
property :pattern, Object
property :block, Text
property :id, Serial # Unique identifier
property :pattern, Object # Query pattern
property :type, Object # Resource type
property :block, Text # Associated callback
end

View File

@@ -55,7 +55,8 @@ module RubyDNS
# Add new rule to database
BeEF::Core::Models::DNS::Rule.create(
:id => id,
:pattern => pattern,
:pattern => pattern[0],
:type => pattern[1],
:block => block.to_source
)
end