json.extract! bar, :id, :created_at, :updated_at json.url bar_url(bar, format: :json)