One option is to add after_filter to application.rb (so that it applies to all actions) and do the following:
def store_bandwidth_usage
response_size = response.body.size
@current_user.increment!(:bandwidth_usage, response_size)
end
Of course, you will need a before_filter file, which would check that the user has not passed through the allocated bandwidth, otherwise they will be denied access.
, , rails, , (, ), .