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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
580
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
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
Webhook best practices for rock solid and resilient deployments
glaforge
2
310
(技術的には)社内システムもOKなブラウザエージェントを作ってみた!
har1101
0
300
旅先で iPad + Neovim で iOS 開発・執筆した話
zozotech
PRO
0
100
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
210
ランサムウェア対策としてのpnpm導入のススメ
ishikawa_satoru
0
230
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
240
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
330
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
Red Hat OpenStack Services on OpenShift
tamemiya
0
140
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.2k
Agile Leadership Summit Keynote 2026
m_seki
1
680
Featured
See All Featured
Abbi's Birthday
coloredviolet
1
4.8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
Side Projects
sachag
455
43k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
460
Chasing Engaging Ingredients in Design
codingconduct
0
120
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
79
Embracing the Ebb and Flow
colly
88
5k
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Ethics towards AI in product and experience design
skipperchong
2
200
Paper Plane (Part 1)
katiecoart
PRO
0
4.3k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
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 पΓ͕๛࡞Ͱָͦ͠͏