profile
Hello all ๐Ÿ‘‹๐Ÿป ๐Ÿ“London

rails - watch list day2

1. controller setup ๋จผ์ € ์ดํ•ด๋ฅผ ์œ„ํ•œ ์Šคํ‚ค๋งˆ ์‚ฌ์ง„ ์žฌ์—…๋กœ๋“œ ๐Ÿ key point ์–ด๋–ค ๋ชจ๋ธ์˜ ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ํ•„์š”ํ•œ์ง€ ์ƒ๊ฐํ•ด๋ณด๊ธฐ. no need to generate movie controller ์™œ๋ƒํ•˜๋ฉด ๋จผ์ € movie ์ •๋ณด๋“ค์„ ๋ชจ๋‘ api๋กœ ๊ฐ€์ ธ์™€

2022๋…„ 3์›” 24์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
post-thumbnail

rails watch list - day1

datatypesurl:stringforiegn_keys:referencesassociationdependent: :destroyDestroying the children is ideal. You do that by setting dependent: :destroy o

2022๋…„ 3์›” 23์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
post-thumbnail

hidden_field_tag

This will add a hidden input field with an authenticity_token that ensures the POST request is coming from your website and not from another. ์ด๊ฒŒ ์ •๋ง ๋ญ˜๊นŒ

2022๋…„ 1์›” 14์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
post-thumbnail

TIL - flatten() array method

flatten() ์—ฌ๋Ÿฌ๋ฐฐ์—ด์„ 1์ฐจ์› ํ˜•ํƒœ [] ๋กœ ๋งŒ๋“œ๋Š” ๋ฉ”์†Œ๋“œ.

2021๋…„ 11์›” 17์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
post-thumbnail

Ruby - Ruby File.open modes and options

rOpens a file for reading only. The file pointer is placed at the beginning of the file. This is the default mode.rbOpens a file for reading only in b

2021๋…„ 11์›” 3์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
post-thumbnail

Ruby - Object oriented programming

๊ฐ์ฒด ์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ๋ชจ๋“ˆ์„ ํ†ตํ•ด ๋ณต์žกํ•œ ์ฝ”๋“œ๋ฅผ ๋‹จ์ˆœํ™”์‹œํ‚ฌ ์ˆ˜ ์žˆ์—ˆ๋‹ค like ์ˆ˜๋‚ฉ๊ณต๊ฐ„. ๊ทธ๋Ÿฌํ•œ ์—ฐ์žฅ์„ ์ƒ์—์„œ ์ง„์ „๋œ ๊ฐœ๋…์ด ๋ฐ”๋กœ ๊ฐ์ฒด์ด๋‹ค. object์ด๋‹ค. Object๋ฅผ ์ชผ๊ฐœ๋ณด๋ฉด Class + instance๊ฐ€ ์žˆ๋‹ค. ์ด(์‚ฌ๋ก€, ๊ตฌ์ฒด์ ์ธ ์˜ˆ์ œ) ๋ง์— ์ต์ˆ™ํ•ด์งˆ ๊ฒƒ. !ํฌ

2021๋…„ 9์›” 22์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
post-thumbnail

Ruby - module

๋ชจ๋“ˆ? ๋ชจ๋“ˆ์— ๋Œ€ํ•œ ๋น„์œ ์„ ์ƒ๊ณผ ํ•™์ƒ์œผ๋กœ ์ด๋ฃจ์–ด์ง„ ํ•™๊ต๊ฐ€ ์žˆ๋‹ค - ํ•™์ƒ์ด ๋Š˜์–ด๋‚จ - ์„ ์ƒ ๊ณต๊ธ‰ ์ฆ๊ฐ€ - ํ•™์ƒ ์—ฐ๋ น์— ๋”ฐ๋ผ ํ•™๋…„ ๋‚˜๋ˆ” - ํ•™๋…„ ์•ˆ์—์„œ ๋ฐ˜์„ ๋˜ ๋‚˜๋ˆ” ๋ฐ˜์ด ์—†๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋ฉด, ์ฒด๊ณ„์—†์–ด ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒ. ๋”ฐ๋ผ์„œ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์ผ์ • ๊ธฐ์ค€์— ๋”ฐ๋ผ ํ•™์ƒ๋“ค์„ ๋ฌถ๋Š” ๊ฒƒ.

2021๋…„ 9์›” 22์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
post-thumbnail

Ruby - code block

๊ฐ™์€ ๊ฒฐ๊ณผ๋ฅผ ๊ฐ–๋Š” ์ฝ”๋“œ. ์œ„์˜ ์ฝ”๋“œ๊ฐ€ ์ง๊ด€์ ์ด๊ณ  ์ฝ”๋“œ์–‘๋„ ์ ์œผ๋ฉฐ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๊ฐ„์„ญ, ์˜ํ–ฅ๋ฐ›์„ ๊ฐ€๋Šฅ์„ฑ์ด ๋” ์ ๋‹ค. ์‚ฌ์‹ค times ์ฝ”๋“œ๋ฅผ ๋œฏ์–ด๋ณด๋ฉด ๋ฐ˜๋ณต๋ฌธ ํ•จ์ˆ˜๊ฐ€ ๋“ค์–ด์žˆ์œผ๋ฏ€๋กœ while์„ ์ดํ•ดํ•˜๋Š” ๊ฒƒ์ด ์ค‘์š”.์งง์€ ๋ฐ˜๋ณต์ •๋„๋Š” ์ฒซ๋ฒˆ์งธ ์ฝ”๋“œ ์‚ฌ์šฉ์ด ๊ถŒ์žฅ๋˜์ง€๋งŒ, ์ด๊ฒƒ์™ธ์—๋Š” ๋‹ค๋ชฉ์  ์‚ฌ

2021๋…„ 9์›” 21์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
post-thumbnail

Ruby - basic 1

JS ๊ธฐ๋ณธ๋ฌธ๋ฒ•๊ณผ ์œ ์‚ฌํ•œ ๋ถ€๋ถ„์ด ๊ฝค ์žˆ๊ธฐ์— ์ค‘๋ณต๋˜๊ฑฐ๋‚˜ ์‰ฌ์šด ๋ถ€๋ถ„์€ ์ œ์™ธํ•˜๊ณ  ๋น ๋ฅด๊ฒŒ ๋ฆฌ์บกํ•˜๋Š” ์ •๋„๋กœ ์ •๋ฆฌ1.๋ฌธ์ž์™€ ๋ฐ์ดํ„ฐํ˜• : ๋ฌธ์ž์—ด์˜ ์ œ์–ดํŒŒ์ด์ฌ๋„ ๋™์ผ๋ฌธ์ž์—ด์— ๋Œ€ํ•ด์„  + \*๋งŒ ๊ฐ€๋Šฅ hello๋ฌธ์ž์—ด ์ค‘ 0๋ฒˆ์งธ ๊ฐ’์„ ๊ฐ€์ ธ์˜ค๋Š” ๊ฒƒ. output > h๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌํ•  ๋•Œ, ์ด๋Ÿฌ

2021๋…„ 9์›” 21์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€