diff options
Diffstat (limited to 'help/app/models/ticket.rb')
-rw-r--r-- | help/app/models/ticket.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/help/app/models/ticket.rb b/help/app/models/ticket.rb index f38fed2..0407012 100644 --- a/help/app/models/ticket.rb +++ b/help/app/models/ticket.rb @@ -37,6 +37,7 @@ class Ticket < CouchRest::Model::Base design do view :by_title + view :by_is_open end validates :title, :presence => true @@ -80,6 +81,7 @@ class Ticket < CouchRest::Model::Base comment = TicketComment.new(attributes.values.first) #TicketComment.new(attributes) #comment.posted_by = User.current.id if User.current #we want to avoid User.current, and current_user won't work here. instead will set in tickets_controller + # what about: comment.posted_by = self.updated_by (will need to add ticket.updated_by) comment.posted_at = Time.now comments << comment |