Rails Nested Routes

What is a Nested Route?

class Userhas_many :drink_ordershas_many :drinks, through: :drink_ordersendclass Drinkhas_many :drink_ordershas_many :users, through: :drink_ordersendclass DrinkOrderbelongs_to :userbelongs_to :drinkend

Long URL’s

Are We in Nested or Not?!

class DrinkOrder   private  def set_drink   @drink = Drink.find_by_id(params[:drink_id])  end
end

What to Remember!

love hateRelationship!Happy Coding! From your,
#CodingEsty

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Tutorial: How to view Namara Data on Your Salesforce Dashboard

(What have you changed for 20 days?)

plsAsset Launch Recap and Next Steps

Making Royal Pavilion and Museums’ Digital Collections More Accessible with the Universal Viewer

How to check if the field value is empty in APEX?

The mystic ‘Kali’ Linux

AWS Partner Network — the requirements before and after re:Invent 2018 — Get Ready Checklist

Top PHP Interview Questions for 2021 and Beyond

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rumiko Acopa

Rumiko Acopa

More from Medium

Class Basics in Ruby

JavaScript construct called destructuring

Hello Javascript, goodbye Ruby

Developing your Vue micro-frontend (part 2)