Sha256: c8d1177ad941e9f0c864e841af7a1e2240fcab2977adcf0520e87c341e08c52d

Contents?: true

Size: 244 Bytes

Versions: 14

Compression:

Stored size: 244 Bytes

Contents

module BestBoy
  module BestBoyViewHelper
    def relative_occurrences(hash, key)
      val = hash[key].to_f
      val = val / hash[:overall].to_f * 100 if hash[:overall].to_i > 0
      number_to_percentage(val, precision: 2)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
best_boy-3.1.0 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-3.0.0 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.2.3 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.2.2 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.2.1 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.2.0 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.1.4 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.1.3 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.1.2 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.1.1 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.1.0 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.0.3 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.0.2 app/helpers/best_boy/best_boy_view_helper.rb
best_boy-2.0.0 app/helpers/best_boy/best_boy_view_helper.rb