avoinministerio/avoinministerio — pull request #264 by wasimakram (2012-10-14 00:05:51+00:00)
Title: Multi Survey Includes everything excluding icons

Important snippet

#avoinministerio/app/controllers/surveyor_controller.rb
# 14 days check on surveys
...
if last_rs && (Time.now - last_rs.started_at) < 14.days
if last_rs.completed_at.nil?
@response_set = last_rs
else
@response_set = nil
end
else
@response_set = ResponseSet.
create(:survey => @survey, :user_id => (@current_user.nil? ? @current_user : @current_user.id))
end
...

#avoinministerio/app/controllers/signatures_controller.rb
#Storing info to profiles
....
profile = current_citizen.profile
profile.authenticated_firstnames = @signature.firstnames
profile.authenticated_lastname = @signature.lastname
profile.authenticated_occupancy_county = @signature.occupancy_county
profile.authenticated_birth_date = @signature.birth_date
profile.save
....