diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index 281f6216d..3aba819e0 100644 --- a/app/controllers/softapplications_controller.rb +++ b/app/controllers/softapplications_controller.rb @@ -56,8 +56,10 @@ class SoftapplicationsController < ApplicationController @stars_status_map = Hash.new(0.0) stars_status.each do |star_status| + percent = percent_of(star_status.scount, stars_reates_count).to_f + percent_m = format("%.2f", percent) @stars_status_map["star#{star_status.stars.to_i}".to_sym] = - percent_of(star_status.scount, stars_reates_count).to_s + "%" + percent_m.to_s + "%" end @jours = @softapplication.journals_for_messages.order('created_on DESC') @image_results = [] diff --git a/app/views/softapplications/show.html.erb b/app/views/softapplications/show.html.erb index e68ae699f..c2f260e60 100644 --- a/app/views/softapplications/show.html.erb +++ b/app/views/softapplications/show.html.erb @@ -63,8 +63,9 @@