]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/issues_controller.rb
Merge remote-tracking branch 'upstream/pull/3886'
[rails.git] / app / controllers / issues_controller.rb
index cd3584f027536b00e067f04050d234893b68f921..10a6dc09ba603203fb43293a7b32a7dd0c8fd09f 100644 (file)
@@ -12,8 +12,8 @@ class IssuesController < ApplicationController
     @title = t ".title"
 
     @issue_types = []
-    @issue_types.concat %w[Note] if current_user.moderator?
-    @issue_types.concat %w[DiaryEntry DiaryComment User] if current_user.administrator?
+    @issue_types.push("Note") if current_user.moderator?
+    @issue_types.push("DiaryEntry", "DiaryComment", "User") if current_user.administrator?
 
     @users = User.joins(:roles).where(:user_roles => { :role => current_user.roles.map(&:role) }).distinct
     @issues = Issue.visible_to(current_user)
@@ -47,9 +47,10 @@ class IssuesController < ApplicationController
     @new_comment = IssueComment.new(:issue => @issue)
   end
 
-  # Status Transistions
+  # Status Transitions
   def resolve
     if @issue.resolve
+      @issue.updated_by = current_user.id
       @issue.save!
       redirect_to @issue, :notice => t(".resolved")
     else