Using rails_admin with rails_api

后端 未结 3 2107
鱼传尺愫
鱼传尺愫 2021-02-14 16:54

I originally posted this as an issue on rails_api GitHub, but am now posting it here due to inactivity.

I\'m trying to use rails_admin with a Rails 5 API ap

3条回答
  •  深忆病人
    2021-02-14 17:28

    You should have a json view file in this location bookings/index.json.jbuilder And inside this file something like

    bookings/index.json.jbuilder

    json.name @bookings.name
    json.date @bookings.date
    

    This is another template missing

    application/index

    but really don't know you app completely. So maybe that's the application layout you implemented using ActionView::Layouts. In that case is asking you to implement a layout page file in the location application/index.

    NOTE: Those two file inside the views folder.

提交回复
热议问题