From c377d0957d1f06e99b780e37faf7c51fb9dc6f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E6=9D=B0?= <515298495@qq.com> Date: Mon, 20 May 2019 14:52:34 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=86=99=E4=B8=80=E6=AC=A1=E5=B0=B1?= =?UTF-8?q?=E5=A5=BD.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...31\344\270\200\346\254\241\345\260\261\345\245\275.md" | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 "ruby/\345\206\231\344\270\200\346\254\241\345\260\261\345\245\275.md" diff --git "a/ruby/\345\206\231\344\270\200\346\254\241\345\260\261\345\245\275.md" "b/ruby/\345\206\231\344\270\200\346\254\241\345\260\261\345\245\275.md" new file mode 100644 index 0000000..b85c2d3 --- /dev/null +++ "b/ruby/\345\206\231\344\270\200\346\254\241\345\260\261\345\245\275.md" @@ -0,0 +1,8 @@ +### update_attributes 重复了 +``` +if member.update_attributes(access_level: params[:access_level], update_by: current_user) && user.update_attributes(name: params[:name]) +``` +改为如下: +``` +if member.update_attributes(access_level: params[:access_level], update_by: current_user, remark: params[:name]) +``` \ No newline at end of file -- Gitee