]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/diary_comments_controller.rb
Replace permit/require with expect for parameter validation
[rails.git] / app / controllers / diary_comments_controller.rb
index 91e05ff7413f9cd3d0a5a28308e93aa0ad8d8a3a..5bbf2bf63dc0efd60f3b70d525f7fe20c4ca202b 100644 (file)
@@ -51,6 +51,6 @@ class DiaryCommentsController < ApplicationController
   ##
   # return permitted diary comment parameters
   def comment_params
-    params.require(:diary_comment).permit(:body)
+    params.expect(:diary_comment => [:body])
   end
 end