Giter VIP home page Giter VIP logo

Comments (2)

rwz avatar rwz commented on June 8, 2024

Thanks for reporting it!

from jbuilder.

silva96 avatar silva96 commented on June 8, 2024

Hi, I'm using rails version 5.02 and jbuilder 2.6.3
I'm also having this problem.

here is my view.json.jbuilder

json.(@booking, :api_data_schemas, :tickets_api_data_schemas)
json.seats @booking.seats do |seat|
  json.extract! seat, :id, :number_with_level, :bus_schedule_id, :seat_klass, :seat_klass_stars
  json.price seat.price.to_i
  json.price_usd seat.price_usd.to_f
end

and here is my json output: (note the is_a? 2 times

{
  "is_a?": {},
  "api_data_schemas": {
    "outbound": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "properties": {
        "departure_bus_stop": {
          "title": "Subida",
          "type": "integer",
          "values": [
            {
              "title": "TERMINAL SUR",
              "value": 1
            },
            {
              "title": "Cruce Colón",
              "value": 8
            }
          ]
        },
        "destination_bus_stop": {
          "title": "Bajada",
          "type": "integer",
          "values": [
            {
              "title": "TERMINAL OSORNO",
              "value": 5
            },
            {
              "title": "Cruce Los Tambores",
              "value": 29
            }
          ]
        }
      },
      "required": [
        "departure_bus_stop",
        "destination_bus_stop"
      ]
    }
  },
  "tickets_api_data_schemas": {},
  "seats": [
    {
      "is_a?": {},
      "id": 375,
      "number_with_level": "1-4",
      "bus_schedule_id": 417,
      "seat_klass": "2",
      "seat_klass_stars": 2,
      "price": 25000,
      "price_usd": 40.95
    }
  ]

What could be possibly happening? because this bug was fixed

Thanks in advance

from jbuilder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.