#RubyOnRails - 24 November 2018
« Back 1 day Forward 1 day »
[11:43:18] Sylario: The way I understad Active Model Serializer, it includes relations if there is no serializer for said relation or it reference them if there is a serializer
[11:44:27] Sylario: I would like to be able to have a serializer for a parent and a children, and be able, say when I call the serializer from an index view, to only reference the relation
[11:45:14] Sylario: However when the serializer is called from a show action, I would like to include the whole childrens inside the JSON
[19:49:20] johnsillings: hey all - i'm trying to deploy my first rails app to my server (ubuntu 18.04) for the first time...
[19:49:42] johnsillings: can anyone point me in the right direction re: a tutorial or guide for total noobs?
[19:52:37] johnsillings: ah - and just like that, i'm getting pulled away from my computer. i'll try back later. :)
[21:17:55] hightower3: Hey why does presence: true validation fails for a form input whose value is false? And/or how do I write a validation then for a field that is essentially a boolean
[22:38:02] hightower3: Hey I have a model Reservation which belongs to User and Product. When I do a link_to reservation, it generates URL in the form of /products/<reservation ID>/reservations ... Is this OK, and what might I be missing/doing wrong here?
[22:38:28] hightower3: I was expecting that the link would be either /reservations/:id or at worst /users/:userid/reservations/:reservationid
[23:00:36] cnsvc: if you have 'resources :reservations' in routes, you could write like 'link_to "Reservation", reservation_path(@reservation)', which normally generates '/reservations/#id'
[23:01:43] hightower3: yeah, though I suspect my issue is that I need URL /users/:id/reservations/:id... I don't understand why my URL got created as /products/:reservation_id/reservations
[23:22:32] hightower3: also another thing I was looking at was to define resources :user do resources :reservation ....