Skip to content

Commit

Permalink
Merge pull request #404 from naleksi/master
Browse files Browse the repository at this point in the history
Fixing survey link generation
  • Loading branch information
naleksi committed Jun 20, 2013
2 parents d93ae4b + 672fe6c commit e513b2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def self.get_survey_link(survey_code, user_email, user_state = nil)
latest_rs = user.response_sets.last
user_state ||= latest_rs.nil? ? "signed_up" : latest_rs.user_state
survey = Survey.where(access_code: survey_code).order("survey_version DESC").first
response_set = ResponseSet.create(survey: survey, user_id: user)
response_set = ResponseSet.create(survey: survey, user_id: user.id)
response_set.update_attribute(:user_state, user_state)
Rails.application.routes.url_helpers.
edit_my_survey_path( survey_code: survey.access_code, response_set_code: response_set.access_code)
Expand Down

0 comments on commit e513b2c

Please sign in to comment.