diff --git a/app/controllers/missions_controller.rb b/app/controllers/missions_controller.rb index 8642172..5df24ba 100644 --- a/app/controllers/missions_controller.rb +++ b/app/controllers/missions_controller.rb @@ -77,7 +77,7 @@ class MissionsController < ApplicationController note = Note.new note.project_id = pid note.user_id = uid - note.type = 3 + note.category = 3 note.content = "任务信息发生了变化" note.save! end diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 9219c3b..7519daf 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -17,7 +17,7 @@ class NotesController < ApplicationController note[:date] += [{ :content => i.content, :time => i.created_at.to_time, - :type => i.type + :type => i.category }] end data = [] diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index b359864..0609052 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -55,7 +55,7 @@ class ProjectsController < ApplicationController note = Note.new note.user_id = uid note.project_id = pid - note.type = 2 + note.category = 2 note.content = User.find(uid).name + "邀请您进入项目" + Project.find(pid).name note.save! diff --git a/app/controllers/shares_controller.rb b/app/controllers/shares_controller.rb index 046bcae..eb9dfca 100644 --- a/app/controllers/shares_controller.rb +++ b/app/controllers/shares_controller.rb @@ -19,7 +19,7 @@ class SharesController < ApplicationController note = Note.new note.user_id = tuid note.project_id = pid - note.type = 1 + note.category = 1 note.content = content note.save! end