8000 active_record_composite_primary_keys.mdの欠落箇所を修正 by yujikuroki · Pull Request #1824 · yasslab/railsguides.jp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

active_record_composite_primary_keys.mdの欠落箇所を修正 #1824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

yujikuroki
Copy link

概要

英語原文

Composite key parameters contain multiple values in one parameter. For this reason, we need to be able to extract each value and pass them to Active Record. We can leverage the extract_value method for this use-case.

リンク

「Action Controller の概要」ページ「複合主キーのパラメータ」セクションの説明文

複合キーパラメータは、1個のパラメータに複数の値を含み、値同士は区切り文字(アンダースコアなど)で区切られます。したがって、Active Recordに渡すには個別の値を抽出する必要があります。これを行うには、extract_valueメソッドを使います。

リンク


Railsガイドいつもありがたく活用させていただいております。皆様ありがとうございます 🙏

@yasulab yasulab requested a review from hachi8833 February 3, 2025 16:57
@yasulab
Copy link
Member
yasulab commented Feb 3, 2025

修正PRありがとうございます...!! 助かります!! 🙏 💖 ✨

@yasulab yasulab merged commit d208263 into yasslab:master Feb 3, 2025
2 checks passed
@hachi8833
Copy link
Collaborator

修正ありがとうございます!v7.2とv7.1にも反映します。

hachi8833 added a commit that referenced this pull request Feb 4, 2025
active_record_composite_primary_keys.mdを修正

#1824
hachi8833 added a commit that referenced this pull request Feb 4, 2025
active_record_composite_primary_keys.md

#1824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0