rails json exclude nested attribute

Solutions on MaxInterview for rails json exclude nested attribute by the best coders in the world

showing results for - "rails json exclude nested attribute"
Miranda
01 Feb 2020
1render :json => @booking, :include => [:paypal, 
2                                       :boat_people,
3                                       :boat => {:only => :name, :include => {:port => {:only => :name, :include => {:city => {:only => :name, :include => {:country => {:only => :name}}}}}, 
4                                                :boat_model => {:only => :name, :include => {:boat_type => {:only => :name}}}}}]
5