parent
5a50473e69
commit
8c520b3e0f
@ -1,28 +0,0 @@ |
|||||||
#-- encoding: UTF-8 |
|
||||||
#-- copyright |
|
||||||
# OpenProject is a project management system. |
|
||||||
# |
|
||||||
# Copyright (C) 2012-2013 the OpenProject Team |
|
||||||
# |
|
||||||
# This program is free software; you can redistribute it and/or |
|
||||||
# modify it under the terms of the GNU General Public License version 3. |
|
||||||
# |
|
||||||
# See doc/COPYRIGHT.rdoc for more details. |
|
||||||
#++ |
|
||||||
|
|
||||||
class Journal::DocumentJournal < ActiveRecord::Base |
|
||||||
self.table_name = "document_journals" |
|
||||||
|
|
||||||
belongs_to :journal |
|
||||||
|
|
||||||
@@journaled_attributes = [:project_id, |
|
||||||
:category_id, |
|
||||||
:title, |
|
||||||
:description, |
|
||||||
:created_on] |
|
||||||
|
|
||||||
def journaled_attributes |
|
||||||
attributes.symbolize_keys.select{|k,_| @@journaled_attributes.include? k} |
|
||||||
end |
|
||||||
|
|
||||||
end |
|
@ -1,12 +0,0 @@ |
|||||||
class CreateDocumentJournals < ActiveRecord::Migration |
|
||||||
def change |
|
||||||
create_table :document_journals do |t| |
|
||||||
t.integer :journal_id, :null => false |
|
||||||
t.integer :project_id, :default => 0, :null => false |
|
||||||
t.integer :category_id, :default => 0, :null => false |
|
||||||
t.string :title, :limit => 60, :default => "", :null => false |
|
||||||
t.text :description |
|
||||||
t.datetime :created_on |
|
||||||
end |
|
||||||
end |
|
||||||
end |
|
Loading…
Reference in new issue