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
740
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
120
渋谷アジャイルコミュニティへの想い #shibuyagile
treby
0
1.1k
久々にコードを書いてOmniauthでハマった話
treby
0
1k
IM@Study活動紹介
treby
1
580
全ての雑用を、生まれる前に消し去りたい
treby
0
540
Webエンジニアからデータエンジニアへ転向している話 #pronama
treby
0
400
Shinjuku.rbの移り変わりについて、あるいは大規模カンファレンスの知見を募集したい話 #tqrk13
treby
1
170
EMの悩みにフォーカスする #em_izakaya
treby
0
560
この先生きのこるためのエンジニアキャリア戦略パターン #em_meetup
treby
5
2.6k
Other Decks in Technology
See All in Technology
CDK Vibe Coding Fes
tomoki10
1
540
Enhancing SaaS Product Reliability and Release Velocity through Optimized Testing Approach
ropqa
1
250
American airlines ®️ USA Contact Numbers: Complete 2025 Support Guide
airhelpsupport
0
390
How Do I Contact HP Printer Support? [Full 2025 Guide for U.S. Businesses]
harrry1211
0
130
データ基盤からデータベースまで?広がるユースケースのDatabricksについて教えるよ!
akuwano
3
160
【LT会登壇資料】TROCCO新コネクタ「スマレジ」を活用した直営店データの分析
kazari0425
1
170
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
7.8k
microCMSではじめるAIライティング
himaratsu
0
120
TableauLangchainとは何か?
cielo1985
1
150
インフラ寄りSREの生存戦略
sansantech
PRO
9
3.4k
united airlines ™®️ USA Contact Numbers: Complete 2025 Support Guide
flyunitedhelp
1
470
モニタリング統一への道のり - 分散モニタリングツール統合のためのオブザーバビリティプロジェクト
niftycorp
PRO
1
370
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
The Invisible Side of Design
smashingmag
301
51k
A designer walks into a library…
pauljervisheath
207
24k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
GitHub's CSS Performance
jonrohan
1031
460k
Raft: Consensus for Rubyists
vanstee
140
7k
Designing for humans not robots
tammielis
253
25k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Navigating Team Friction
lara
187
15k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
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 पΓ͕๛࡞Ͱָͦ͠͏