|
|
@ -56,12 +56,12 @@ class SoftapplicationsController < ApplicationController
|
|
|
|
stars_status = stars_reates.select("stars, count(*) as scount").
|
|
|
|
stars_status = stars_reates.select("stars, count(*) as scount").
|
|
|
|
group("stars")
|
|
|
|
group("stars")
|
|
|
|
|
|
|
|
|
|
|
|
@stars_status_map = Hash.new(0.0)
|
|
|
|
@stars_status_map = Hash.new(0)
|
|
|
|
stars_status.each do |star_status|
|
|
|
|
stars_status.each do |star_status|
|
|
|
|
percent = percent_of(star_status.scount, stars_reates_count).to_f
|
|
|
|
percent = percent_of(star_status.scount, stars_reates_count).to_f
|
|
|
|
percent_m = format("%.2f", percent)
|
|
|
|
people = star_status.scount.to_i
|
|
|
|
@stars_status_map["star#{star_status.stars.to_i}".to_sym] =
|
|
|
|
@stars_status_map["star#{star_status.stars.to_i}".to_sym] =
|
|
|
|
percent_m.to_s + "%"
|
|
|
|
people.to_s
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@jours = @softapplication.journals_for_messages.order('created_on DESC')
|
|
|
|
@jours = @softapplication.journals_for_messages.order('created_on DESC')
|
|
|
|
@image_results = []
|
|
|
|
@image_results = []
|
|
|
|