Project

General

Profile

Defect #322

回答内容が表示されない。

Added by Haru Iida about 9 years ago. Updated almost 9 years ago.

Status:
終了(Closed)
Priority:
通常(Normal)
Target version:
Start date:
04/09/2010
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

以下のように直したら動きました。

joel_test_controller.rb の L38

変更前

@target.user_id = User.current

左辺がIDで右辺がオブジェクトになっていたのでIDに統一。

変更後

@target.user_id = User.current.id

joel_test_controller.rb の L58

find_last_score_of_userにUserオブジェクトを渡しているが、受け取り側はユーザIDが来ることを期待しているようなのでIDを渡すよう変更

変更前

  def find_last_answer
    @target = JoelTestScore.find_last_score_of_user(@user)
  end

変更後

  def find_last_answer
    @target = JoelTestScore.find_last_score_of_user(@user.id)
  end

Associated revisions

Revision 0:d3c72a73640d (diff)
Added by Takashi Takebayashi about 9 years ago

fixes #322
version 0.0.2 初期構築

Revision 1:22cf148c7705 (diff)
Added by Takashi Takebayashi about 9 years ago

fixes #322
version 0.0.2 初期構築

History

#1

Updated by Takashi Takebayashi about 9 years ago

  • Status changed from 新規(New) to 終了(Closed)
  • Assignee set to Takashi Takebayashi
  • % Done changed from 0 to 100
#2

Updated by Takashi Takebayashi about 9 years ago

  • Target version set to 0.0.2
#3

Updated by Takashi Takebayashi almost 9 years ago

  • Estimated time set to 0.50 h

Also available in: Atom PDF