From 603e11d7a5aa62f923e7b013cac6c66462131232 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 29 Aug 2007 16:52:35 +0000 Subject: Merged 0.6 branch into trunk. Permissions management was rewritten. Some permissions can now be specifically defined for non member and anonymous users. This migration: * is irreversible (please, don't forget to *backup* your database before upgrading) * resets role's permissions (go to "Admin -> Roles & Permissions" to set them after upgrading) git-svn-id: http://redmine.rubyforge.org/svn/trunk@674 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/document.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/document.rb') diff --git a/app/models/document.rb b/app/models/document.rb index 8b5d68e87..6989191ce 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -20,6 +20,8 @@ class Document < ActiveRecord::Base belongs_to :category, :class_name => "Enumeration", :foreign_key => "category_id" has_many :attachments, :as => :container, :dependent => :destroy + acts_as_event :url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.id}} + validates_presence_of :project, :title, :category validates_length_of :title, :maximum => 60 end -- cgit v1.2.3