Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in surveyor_controller.rb #37

Closed
tmeasday opened this issue Nov 13, 2009 · 3 comments
Closed

Bug in surveyor_controller.rb #37

tmeasday opened this issue Nov 13, 2009 · 3 comments

Comments

@tmeasday
Copy link

Line #29 says
if (@Survey = Survey.find_by_access_code(params[:survey_code])) && (@response_set = ResponseSet.create(:survey => @Survey, :user_id => @current_user))

Shouldn't is say:
if (@Survey = Survey.find_by_access_code(params[:survey_code])) && (@response_set = ResponseSet.create(:survey => @Survey, :user => @current_user))

(the results it was creating didn't properly have users attached).

@brian-lc
Copy link
Contributor

Yes, I believe that you are correct. We will fix this in the next release.

@yoon
Copy link
Member

yoon commented Nov 13, 2009

it depends, @current_user can be nil. i'll fix with a check for respond_to?(:id)

@yoon
Copy link
Member

yoon commented Nov 13, 2009

@current_user.id if @current_user isn't nil. Closed by 95fd530

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants