From a793aecf25796319543b6280dbe51d1c9d574075 Mon Sep 17 00:00:00 2001 From: Felix Wolfsteller Date: Wed, 7 Oct 2020 20:05:12 +0200 Subject: [PATCH] Place has_many Courses+ --- app/models/place.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/place.rb b/app/models/place.rb index f02d952..82cf4ab 100644 --- a/app/models/place.rb +++ b/app/models/place.rb @@ -9,6 +9,8 @@ class Place < ApplicationRecord ranks :row_order, scope: :active + has_many :courses + validates :name, presence: true friendly_id :name, use: :slugged