Upgraded to Rails 4

This commit is contained in:
2019-02-24 15:47:27 +01:00
parent f52ec0411d
commit f809f36c06
86 changed files with 732 additions and 662 deletions

View File

@@ -3,10 +3,10 @@ class Document < ActiveRecord::Base
attr_accessible :name, :parent, :text, :typ, :parent_id, :parent_type
belongs_to :parent, :polymorphic => true
validate :name, :length=>{minimum:3}
validate :text, :presence=>true
validate :typ, :presence=>true
validate :parent, :presence=>true
validates :name, :length=>{minimum:3}
validates :text, :presence=>true
validates :typ, :presence=>true
validates :parent, :presence=>true
has_paper_trail
TYPS = { 1=>"fet_docs", 10=>"protocol", 11=> "agenda"}
has_many :attachments, :as=>:parent