Here is my current code in the controller.
@rating = (@approvals.count / @user.pages.count) + ( @awards.count / @user.stories.count )
When I call each of these variables separately, they come up as the numbers they should. When I add them together, the sum seems to be either 1 or 0. Is there a certain way of adding variable counts together?
I have looked at other posts and either can’t find what I need or am not understanding it.
It could be that you need to convert them to floats. Try to the
to_fmethod.