Skip to content

Commit

Permalink
remove average karma, unvalued and maybe counterproductive: https://l…
Browse files Browse the repository at this point in the history
  • Loading branch information
pushcx committed Feb 19, 2024
1 parent ac324c9 commit ab604bc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
8 changes: 0 additions & 8 deletions app/models/user.rb
Expand Up @@ -220,14 +220,6 @@ def avatar_url(size = 100)
)
end

def average_karma
if karma == 0
0
else
karma.to_f / (stories_submitted_count + comments_posted_count)
end
end

def disable_invite_by_user_for_reason!(disabler, reason)
User.transaction do
self.disabled_invite_at = Time.current
Expand Down
4 changes: 1 addition & 3 deletions app/views/users/show.html.erb
Expand Up @@ -69,9 +69,7 @@
<% if !@showing_user.is_admin? %>
<label class="required">Karma:</label>
<span class="d">
<%= @showing_user.karma %>, averaging <%=
number_with_precision(@showing_user.average_karma, :precision => 2) %>
per story/comment
<%= @showing_user.karma %>
</span>
<br>
<% end %>
Expand Down

0 comments on commit ab604bc

Please sign in to comment.