From 3b211788ba00ef2e59aa5c1963ae0c9be8f2accf Mon Sep 17 00:00:00 2001 From: Claudius Nicolae Date: Wed, 27 Mar 2013 22:56:56 +0200 Subject: [PATCH] fix #129 record creation, only audit creates on records - too much data --- app/models/record.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/record.rb b/app/models/record.rb index ac76b5e..a40d3b4 100644 --- a/app/models/record.rb +++ b/app/models/record.rb @@ -1,6 +1,6 @@ class Record < ActiveRecord::Base stampable - audited + audited on: [:create] belongs_to :domain, :inverse_of => :records belongs_to :user, :inverse_of => :records @@ -8,6 +8,7 @@ class Record < ActiveRecord::Base cattr_reader :types @@types = %w(SOA NS A MX TXT CNAME AAAA SRV) + attr_accessible :name, :content, :ttl, :prio validates :domain, :name, :presence => true validates :type, :inclusion => {:in => @@types, :message => "Unknown record type"}