The OP had the right idea almost 12 years ago. Views should be objects. Now there are ways to do this in Rails with ViewComponent or Phlex.