watch list - day1
1. rails new setup
2. scratching DB
3. rails g model
-
datatypes
url:string
foriegn_keys:references
-
association
dependent: :destroy
Destroying the children is ideal. You do that by setting dependent: :destroy on the has_many relationship. Like so:
class Parent ApplicationRecord
has_many :children, dependent: :destroy
end
datatypes
url:string
foriegn_keys:references
association
dependent: :destroy
Destroying the children is ideal. You do that by setting dependent: :destroy on the has_many relationship. Like so:class Parent ApplicationRecord has_many :children, dependent: :destroy end
https://blog.getcensus.com/cascading-deletes-in-rails/
- validation (has_many, belongs_to)
bookmark.rb (bookmark model)
validates_uniqueness_of :movie_id, scope: :list_id
4. routes.rb setup
5. rails g controller
- devise authentication setup (tbc)
- make method following the routes
- make private method in order to get secured params.e
- make private method find model
Author And Source
이 문제에 관하여(watch list - day1), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://velog.io/@khg04170/rails-watch-list-day1
저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
- devise authentication setup (tbc)
- make method following the routes
- make private method in order to get secured params.e
- make private method find model
Author And Source
이 문제에 관하여(watch list - day1), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@khg04170/rails-watch-list-day1저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)