Input output filtering for ActiveRecord