パRails🚂
rails s
できない可能性が高いです。
@ayu-0505
13-2 「コールバックオブジェクト」から
13-2-4 510p の途中まで。
PR:
13-2-4 510p 「▫️更新系の場合」から🚂
@sharoa
@ayu-0505
@moegi29
- コールバックオブジェクトを今回の例ではmodelの中で使っているけどもっと共通化したい場合はconcernディレクトリの中で使うみたい
- コールバックオブジェクトはブートキャンプアプリの中でも使われている。書き方を覚えておきたいと思いました
- __send__
とsend
は機能的には同じだけど再定義できる、できない部分で違いがある
- tapメソッドはtapの前のオブジェクトをブロック引数に渡してブロックを渡せるメソッド
- ついに明日最終回!
@sakanobu
@shodan
after_save
で相談部屋を作ってました! https://github.com/fjordllc/bootcamp/blob/main/app/models/user_callbacks.rb@motohiro-mm
send
と__send__
勉強になりました.tap{pp _1}
はメソッドがたくさんつながってるときに途中のselfが分かるので便利(そうにみなさん使ってました)@sugiwe
tap
メソッド、使いこなしたいsend
と__send__
は動作としては同じっぽいけどsend
は再定義できてしまうので、知らぬところで再定義されている可能性を考慮して__send__
を使うと良いらしい…?(予約語みたいに(?)、再定義できなければいいのにとも思った…)@motohiro-mm
13-2-4 510p 「▫️更新系の場合」から
520P 最後まで
PR:
終わり〜!🎉
@sharoa
@sugiwe
@moegi29
@shodan
@ayu-0505
@sakanobu
@motohiro-mm
@sadanora
PR:
PR:
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing