module ViewModel::Controller

def encode_jbuilder

def encode_jbuilder
  builder = Jbuilder.new do |json|
    yield json
  end
  ViewModel.encode_json(builder.attributes!)
end