Split comment field out of map bugs table
Rather than have all comments in a single text field, have each comment in its own entry and only combine them back on output
This commit is contained in:
parent
42822a8b89
commit
eac7348ad2
4 changed files with 85 additions and 8 deletions
14
app/models/map_bug_comment.rb
Normal file
14
app/models/map_bug_comment.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class MapBugComment < ActiveRecord::Base
|
||||
|
||||
set_table_name 'map_bug_comment'
|
||||
|
||||
belongs_to :map_bug, :foreign_key => 'bug_id'
|
||||
|
||||
|
||||
|
||||
validates_presence_of :id, :on => :update
|
||||
validates_uniqueness_of :id
|
||||
validates_presence_of :visible
|
||||
validates_presence_of :date_created
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue