diff --git a/app/controllers/leagues_controller.rb b/app/controllers/leagues_controller.rb index c5b9a2f..71b0118 100644 --- a/app/controllers/leagues_controller.rb +++ b/app/controllers/leagues_controller.rb @@ -454,6 +454,12 @@ def reg_data(reg) grank[:answers] = GRank.convert_answers_to_text(reg.g_rank_result.answers) # grank[:history] = reg.user.g_rank_results.map(&:score).slice(0,12).reverse end + + reg_url = nil + if reg.new_record? == false + reg_url = registration_path(reg) + end + { id: reg._id.to_s, @@ -461,7 +467,7 @@ def reg_data(reg) name_without_pronouns: u.name, email: u.email_address, profile_url: user_path(u), - registration_url: registration_path(reg), + registration_url: reg_url, status: reg.status, rank: reg.rank.to_s.gsub(/\.0$/,''), grank: grank,