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