Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails 6.0の気になった新機能 #shuuumai
Search
Hiroaki Ninomiya
October 09, 2019
Technology
1
750
Rails 6.0の気になった新機能 #shuuumai
『【シューマイ】Tech Lead Engineerから最新技術を学べ!Rails編×station』
https://shuuu-mai.connpass.com/event/146313/
Hiroaki Ninomiya
October 09, 2019
Tweet
Share
More Decks by Hiroaki Ninomiya
See All by Hiroaki Ninomiya
スタートアップとは何か?アジャイル文脈で何が大変なのか? #shibuyagile
treby
0
170
渋谷アジャイルコミュニティへの想い #shibuyagile
treby
0
1.3k
久々にコードを書いてOmniauthでハマった話
treby
0
1k
IM@Study活動紹介
treby
1
600
全ての雑用を、生まれる前に消し去りたい
treby
0
570
Webエンジニアからデータエンジニアへ転向している話 #pronama
treby
0
410
Shinjuku.rbの移り変わりについて、あるいは大規模カンファレンスの知見を募集したい話 #tqrk13
treby
1
170
EMの悩みにフォーカスする #em_izakaya
treby
0
580
この先生きのこるためのエンジニアキャリア戦略パターン #em_meetup
treby
5
2.6k
Other Decks in Technology
See All in Technology
AI アクセラレータチップ AWS Trainium/Inferentia に 今こそ入門
yoshimi0227
1
200
プロンプトエンジニアリングを超えて:自由と統制のあいだでつくる Platform × Context Engineering
yuriemori
0
430
コールドスタンバイ構成でCDは可能か
hiramax
0
130
サラリーマンソフトウェアエンジニアのキャリア
yuheinakasaka
40
19k
2025年 山梨の技術コミュニティを振り返る
yuukis
0
160
【Agentforce Hackathon Tokyo 2025 発表資料】みらいシフト:あなた働き方を、みらいへシフト。
kuratani
0
120
わが10年の叡智をぶつけたカオスなクラウドインフラが、なくなるということ。
sogaoh
PRO
1
580
AI との良い付き合い方を僕らは誰も知らない (WSS 2026 静岡版)
asei
1
310
Models vs Bounded Contexts for Domain Modularizati...
ewolff
0
190
「違う現場で格闘する二人」——社内コミュニティがつないだトヨタ流アジャイルの実践とその先
shinichitakeuchi
0
350
ALB「証明書上限問題」からの脱却
nishiokashinji
0
130
Databricks Free Editionで始めるLakeflow SDP
taka_aki
0
110
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.9k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.5k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
180
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
47
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
96
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
エンジニアに許された特別な時間の終わり
watany
106
230k
Google's AI Overviews - The New Search
badams
0
890
Transcript
Rails 6.0 ͷؾʹͳͬͨ৽ػೳ 2019/10/09 γϡʔϚΠRailsฤ Hiroaki Ninomiya a.k.a @treby006
ࣗݾհ • treby(ͱΕͼʔ) a.k.a Hiroaki Ninomiya • Reproגࣜձࣾ BizDevࣄۀ෦ •
Solution Architect • BtoB SaaSاۀ • ৬ۀΤϯδχΞͷΩϟϦΞΛߟ͑Δɺʮ͖ͷ͜ΔΤϑΤϜʯ͍ͬͯ·͢ • Vue Fes Japan 2019 ίΞελοϑ(෩)
ϙουΩϟετ
Vue Fes Japan 2019(10/12)
Agenda • ձࣾհ • ࣮։ൃऀͱͯ͠Rails6ͷ͏ͪؾʹͳͬͨػೳΛ͝հʂ
Reproגࣜձࣾ • 2014ઃཱͷελʔτΞοϓاۀ • https://repro.io/ • BtoB SaaS • ࣗࣾϓϩμΫτRepro
SDKΛ։ൃ • ϞόΠϧΞϓϦͷੳɾϚʔέςΟϯά༻్ • ಛఆηάϝϯτʹ؆୯ʹϓογϡ௨͕ଧͯΔ • ݱࡏɺઈࢍٸத
Solution Architect • Bizdev -> ʮࣄۀΛՃͤ͞Δʯࣄ • https://note.mu/saas_bizdev/n/ncd38d86262f4 • BizDevͷSolution
Architect • ཁ݅ఆٛΛ͢ΔΑΓߋʹલ͔ΒೖΔ • ސ٬ͷཁٻཧղɺ࿈ܞީิπʔϧͱͷίϛϡχέʔγϣϯ • ࿈ܞͷ͋Δ͖ʹ͍ͭͯɺϩʔυϚοϓΛҾ͖ɺ࣮ߦ͢Δ • هࣄॻ͍ͨͷͰΑ͚Ε: https://tech.repro.io/entry/2019/08/21/174705
ReproͷRails • Reproൃදஈ֊ͰRails 5.2 • Rails 6.0ʹ͢ΔPRཱͬͯΔͷͰ͏·ͳ্͕͘ΔͩΖ͏
Rails 6.0ͷ৽ػೳ https://railsguides.jp/60release_notes.html
ಛʹݸਓతʹؾʹͳͬͨػೳ • Railties • Action Pack • Active Support
rails routesग़ྗΛ֦ுϑΥʔϚοτ ͰදࣔͰ͖Δػೳ • rails routes --expanded ͱॻ͘ͱීஈͷςʔϒϧϑΥʔϚοτͰͳ ͘ৄࡉͳද͕ࣔͳ͞ΕΔ •
େنΞϓϦέʔγϣϯͷRoutesͷߜΓࠐΈ͕Ͱ͖Δͷͳ ͍ͷ͔ • ࣮ -g Φϓγϣϯ͕͋ͬͨɺΒͳ͔ͬͨ • https://github.com/rails/rails/pull/23225 ɺ2016 Rails 5 ͔Β
ͯ͢ͷenumʹ͍ͭͯωΨςΟϒ είʔϓΛՃ • https://github.com/rails/rails/pull/35381 • λΠτϧ͚ͩͰԿͷ͜ͱ͔͔Βͳ͍Ͱ͕͢ class Post < ActiveRecord::Base
enum status: [:drafted, :active, :trashed] end • Post.not_drafted Έ͍ͨͳࢦఆ͕Ͱ͖ΔΑ͏ʹͳΔ • ݸผʹscope͍ͬͯͨͷ͕ෆཁʹͳΔ • ͦͦenum͕͖͔Ͳ͏͔ͱ͍͏ͷ͋Γ·͕͢ɺɺɺ
ActiveRecord.enumͰੜ͞Εͨε ίʔϓΛແޮʹ͢ΔػೳΛՃ • https://github.com/rails/rails/pull/34605 • ಠࣗͰείʔϓ͍ͬͯͨ߹ͱ͔͑ͦ͏ • ͦͦenum͕͖͔(ry
before? ϝιουͱ after? ϝιουΛҎԼʹՃ Date ɺDateTime ɺTime ɺTimeWithZone • https://github.com/rails/rails/pull/32185
• ࣌ؒൺֱܥ • :< , :> ͷൺֱͳͷ͚ͩͲ
ҰׅINSERTΛߦ͏ insert_all / insert_all! / upsert_all ϝιουΛ Ճ • https://github.com/rails/rails/pull/35077
• ActiveRecord#insert_all • ΄͔ͬͨͭ͠
ActiveRecord::Relation#annotate ΛՃ: ActiveRecord::RelationΫΤ ϦʹSQLίϝϯτΛՃ͢Δ • annotate_models ͱผ • ΞϓϦέʔγϣϯίʔυͷҙͷॴͰίϝϯτΛૠೖ͢Δ͜ͱ ͕Ͱ͖Δ
• க͠ํͳ͘ൃߦ͍ͯ͠ΔΫΤϦͱ͔ɺେنͳΞϓϦέʔγϣϯ ͰࠐΉΑ͏ʹ͓ͯ͘͠ͱௐ͕͔ࠪͲΓͦ͏
ຯʹخ͍͠ / ͑ͦ͏ͳ͋Ε͜Ε • Truncateͷαϙʔτ • https://github.com/rails/rails/pull/34779 • Ruby 2.6Ͱಋೖ͞ΕͨΤϯυϨεrangeΛ#whereͰαϙʔτ
• https://github.com/rails/rails/pull/34779 • #inspectͷݸਓใσʔλΛϑΟϧλͰআ֎͢ΔػೳΛՃ • https://github.com/rails/rails/pull/34208
·ͱΊ • Rails6.0ؾʹͳͬͨػೳͱ࣮ࡍͷmigrateͷࣄྫΛհ • Railsී௨ʹॻ͚ΔΑ͏ʹͳͬͨɺͱࢥͬͯͬ͘͡Γ ChangelogPRݟͯΈΔͱൃݟ͕͋ͬͯ໘ന͍ • Rails 6.0ʹ͔ͯ͠Β͍͍ͨػೳ͋Γ·͔ͨ͠ʁ •
ActiveRecord , ActiveSupport पΓ͕๛࡞Ͱָͦ͠͏