In my app, I have a User model, with a goal_ytd method, which performs some calculations.
User
goal_ytd
In a controller, I have a variable @users
@users
On Rails 4.1
If goal_ydt is a column in the users table:
goal_ydt
@users.sum(:goal_ydt)
If goal_ydt is a method in User class:
@users.to_a.sum(&:goal_ydt)