From 8378e4db8ff3f3fe42bc95822c30c317dc486204 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 15 Jul 2019 17:32:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A4=B4=E5=83=8Furl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user.json.jbuilder | 2 +- db/migrate/20190715073825_add_test_for_challenges.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20190715073825_add_test_for_challenges.rb diff --git a/app/views/users/_user.json.jbuilder b/app/views/users/_user.json.jbuilder index afec979a1..66ea1530e 100644 --- a/app/views/users/_user.json.jbuilder +++ b/app/views/users/_user.json.jbuilder @@ -3,5 +3,5 @@ json.login user.login json.name user.full_name json.grade user.grade # json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开 -json.image_url url_to_avatar(user) +json.image_url image_url(url_to_avatar(user)) json.school user.school_name \ No newline at end of file diff --git a/db/migrate/20190715073825_add_test_for_challenges.rb b/db/migrate/20190715073825_add_test_for_challenges.rb new file mode 100644 index 000000000..e7e9bbe80 --- /dev/null +++ b/db/migrate/20190715073825_add_test_for_challenges.rb @@ -0,0 +1,9 @@ +class AddTestForChallenges < ActiveRecord::Migration[5.2] + def change + challenge_answers = ChallengeAnswer.all + byebug + challenge_answers.find_each do |ca| + puts() + end + end +end