Pro Yearly is on sale from $80 to $50! »

Ginza Rails 1

76a777ff80f30bd3b390e275cce625bc?s=47 Akira Matsuda
September 20, 2018

Ginza Rails 1

銀座Rails #1の招待講演のスライド #ginzarails

76a777ff80f30bd3b390e275cce625bc?s=128

Akira Matsuda

September 20, 2018
Tweet

Transcript

  1. 10.years of Rails Development @a_matsuda ۜ࠲Rails #1

  2. self Twitter: @a_matsuda GitHub: amatsuda

  3. ࢓ࣄ ྲྀ͠ͷٕज़ސ໰ۀΈ͍ͨͳ

  4. झຯ

  5. झຯ͸৯΂า͖

  6. RubyϓϩάϥϚʔ / Railsϓϩά ϥϚʔ

  7. ࠓ೔ͷ͓͸ͳ͠

  8. ΍ͬͺGinza SIX͔ͩΒ
 Rails 6ͷ࿩

  9. ΍ͬͺGinza SIX͔ͩΒ
 Rails 6ͷ࿩ ͱࢥ͚ͬͨͲɺ ͋Μ·Γ࿩͍ͨ͜͠ͱ͕ͳ͍ͷͰɺ

  10. ʮRailsʹ͍ͭͯͷ஌ࣝΛަ׵͠ɺ ೔ʑͷ։ൃʹ໾ཱ͍ͯͯ͜͏ʯ

  11. Rails։ൃऀͷํʁ

  12. 10೥Ҏ্Rails։ൃऀ
 ΍ͬͯΔํʁ

  13. ͪΐͬͱੲ࿩

  14. 10.years.ago

  15. github.com͕Ͱ͖ͨ೥

  16. Rails͸͡Ί·ͨ͠

  17. Asakusa.rbୈ1ճmeetupͷ
 ੒Ռ෺

  18. ϦϙδτϦ͸4݄͔ΒGitHubʹஔ͔Ε͚ͯͨͲɺ ύον͸΀ΔΓ͡Όͳͯ͘BTSʹషΔํࣜͩͬͨ https:/ / rails.lighthouseapp.com/ projects/8994/tickets/623

  19. ͋Ε͔Β10೥

  20. 739 Commits ฏۉ5೔Ͱ1ίϛοτ͙Β͍ͱ͍͏ ͜ͱ͕Θ͔Δ

  21. ࢥ͍ग़ਂ͍ίϛοτͨͪ

  22. always enable pp on the Rails console https:/ /github.com/rails/rails/ commit/d54c7781

  23. always enable pp on the Rails console 2011೥ͷ࣌఺Ͱmame͞Μͷ Ruby 2.5ͷ৽ػೳΛઌऔΓ͍ͯ͠

    ͨ͜ͱ͕Θ͔Δ
  24. for ... in => .each https:/ /github.com/rails/rails/ commit/22ed6cb7

  25. for ... in => .each Railsਓͨͪ͸ each Λ࢖͏΋ͷͩ ͱࢥΘΕ͕͚ͪͩͲɺ࣮͸DHH ͸

    for ... in Ͱॻ͍ͯͨʂ
  26. treat fullwidth whitespace as a blank character https:/ /github.com/rails/rails/ commit/9c608603

  27. treat fullwidth whitespace as a blank character String#blank? ͕શ֯εϖʔεͱ ͔ͦͷଞݟ͑ͳ͍จࣈΛશ෦ۭന

    ѻ͍͢ΔΑ͏ʹ ͭ·ΓɺString#blank? ஗ͨ͘͠ ͷΦϨΦϨ
  28. Relation.where with no args can be chained with not, like,

    and not_like https:/ /github.com/rails/rails/ commit/de75af7a
  29. Relation.where with no args can be chained with not, like,

    and not_like 4छྨͷsyntaxΛ࣮૷ͯ͠ఏҊ ࠓͷ where.not() ͷsyntax͸JeremyҊ where.like ͱ͔ where.not_like ΋
 ࣮૷͚ͨ͠ͲɺޙʹDHHʹϦόʔτ
 ͞Εͨ
  30. tyop https:/ /github.com/rails/rails/ commit/c7f1bcd2

  31. tabenai (typo) https:/ /github.com/rails/rails/ commit/407baa2b

  32. tabenai (typo) ͍·ͩʹkamipo͞Μʹݴٴ͞Ε Δίϛοτ……

  33. Space Oddity https:/ /github.com/rails/rails/ commit/d9bdb611

  34. Space Oddity David Bowie͕๢͘ͳͬͨͷͰ͓ ͔͠ͳεϖʔεΛ୳ͯ͠ίϛοτ

  35. Ruby and Rails ࣗ෼ͷओͳकඋൣғ͸Rubyͱ Railsͷؒͷ͋ͨΓ͔ͳɺͱࢥͬ ͯΔͷͰɺͪΐͬͱͦ͜΁Μͷ࿩ Λ͠·͢ɻ

  36. kwargs & binding.local_variable_get Rails Ͱ࢖ͬͯΈΔ͜ͱͰ :if ͱ͔
 :unless ͱ͍͏ϢʔεέʔεΛൃݟ Ruby

    2.2͋ͨΓͰ binding.local_variable_get Λ
 ಋೖ
  37. frozen_string_literal https:/ /bugs.ruby-lang.org/ issues/8976#change-53900

  38. frozen_string_literal Railsͷ .freeze ஍ࠈΛղফ͢Δ
 ͨΊʹRubyଆʹಋೖΛఏҊ

  39. Refinements https:/ /github.com/rails/rails/ commit/571f0f32

  40. Refinements Railsʹಋೖ͠(ͯRubiniusͰಈ͔ ͳ͘͠)ͨͷΦϨΦϨ

  41. require_relative ͩ͞͞͞Μʹͦͦͷ͔͞Εͯ RailsͰ࢖ͬͯΈͨΒόάͬͯͨ Ruby 2.4͙Β͍Ͱमਖ਼

  42. protected Railsք۾Ͱ΍ͨΒͱޡ༻͞Εଓ ͚͖ͯͨػೳ ΄΅શͯ private ͷؒҧ͍

  43. When you say `protected` in Ruby, you might 99% be

    meaning `private` https:/ /github.com/ amatsuda/rails/commit/ 6832343c
  44. ࣮ࡍͷίϛοτ͸ϥΠϒϥϦ͝ͱʹ
 rdocͷग़ྗ݁ՌΛ֬ೝ͠ͳ͕Β

  45. Privatize unneededly protected methods in Active Record https:/ /github.com/rails/rails/ commit/5b14129d

    ͳͲͳͲ
  46. ηΩϡϦςΟؔ࿈ύον΋
 ͍͔ͭ͘ https:/ /github.com/rails/rails/ commit/87eab595 https:/ /github.com/rails/rails/ commit/dfa33fa3 ͱͦͷपล ͳͲͳͲ

  47. ௨Βͳ͔ͬͨఏҊͨͪ

  48. Sexier migrations https:/ /github.com/rails/rails/ pull/1163

  49. Sexier migrations migrationͷ t. Λ࡟Δ΍ͭ t. ཁΒͳ͍ͱࢥ͏Μ͚ͩͲͳ͊

  50. automatic client side validation with HTML 5 "required" attribute https:/

    /github.com/rails/rails/ pull/3590
  51. automatic client side validation with HTML 5 "required" attribute Ϟσϧʹॻ͍ͨvalidationΛΫϥ

    ΠΞϯταΠυʹ΋൓ө 2011೥ʹఏҊ ࣌୅ΛઌऔΓ͗ͯͯ͢͠ݟૹΒΕ ͨ
  52. Action Args ΞΫγϣϯϝιουʹҾ਺Λ ΀ΔΓ͸ग़ͯ͠ͳͯ͘ɺνϟοτͰ ఏҊͨ͠ؾ͕͢Δ DHHʹେےͰ͸ؾʹೖͬͯ΋Β͑ͨ ΋ͷͷɺࡉ͔͍෦෼ͷ࢓༷͕ંΓ߹ Θͣ٫Լ

  53. օ͞Μ͔Βͷ :+1:׻ܴ͠·͢

  54. ͜Μͳײ͡ͰɺRailsຊମʹಥͬࠐΉҎ֎ʹ΋ɺ
 ϓϥάΠϯͱ࣮ͯ͠૷͢Δ͜ͱ΋͋Γ·͢

  55. ϓϥΪϯ։ൃ

  56. i18n_generators

  57. i18n_generators I18nͷϦιʔεΛਓ͕ؒॻ͔ͳ͘ ͯΑ͘ͳΔ࠷ߴʹ΂ΜΓͳ΍ͭ 10೥લʹ࡞ͬͨ΍͚ͭͩͲɺ Rails 5.2Ͱະͩʹ࢖͑Δ

  58. kaminari

  59. kaminari ϖʔδωʔγϣϯ͢Δ΍ͭ Rails 3Ͱಈ͍ͯΔ΋ͷ͕ͳ͔ͬͨ ͷͰ࡞ͬͨ M, V, Cͷ3ͭͷϨΠϠʔʹ
 ·͕ͨΔػೳ

  60. Rails 3ͷ৽ػೳɺRails Engine
 ͬͯ΍ͭͰ࡞ͬͯΈͨͯ͘࡞ͬͨ

  61. ͨͿΜੈքͰ2൪໨͙Β͍ʹݹ͍
 ࣮༻ϨϕϧͷEngine

  62. action_args

  63. action_args DHHʹఏҊ͕௨Βͳ͔͚ͬͨͲɺgemͰ ͝ར༻͍͚ͨͩ·͢ Asakusa.rb໊ٛͰϝϯς શRailsϓϥάΠϯͷதͰҰ൪޷͖ ͱ͍͏͔ɺ͜Ε͕ೖͬͯͳ͍ͱRailsΞϓ Ϧॻ͚ͳ͍

  64. active_decorator

  65. active_decorator ϔϧύʔॻ͖ͨ͘ͳ͍(ϔϧύʔࢮΜͰ ΄͍͠) ઌߦϓϩμΫτ͕ͼͬ͘Γ͢Δ͙Β͍ ϔϘ͔ͬͨͷͰ࢓༷΋࣮૷΋1000ഒ͙ Β͍Ϛγͳ΍ͭΛࣗ࡞ OpinionatedͳσβΠϯ

  66. OpinionatedͳσβΠϯ ࠷ۙͷόʔδϣϯͰ݁ہંΕͨͷ Ͱɺ෦෼తʹഊ๺ͨ͠ͱݴ͑Δ

  67. html5_validations ຊମ΁ͷఏҊ͸௨Βͳ͔͚ͬͨͲ gemͰ͝ར༻͍͚ͨͩ·͢ ϓϥάΠϯ࡞Γͷڭࡐʹͪΐ͏Ͳ ͍͍͔΋

  68. stateful_enum

  69. stateful_enum AR֦ுܥ ΊͪΌΊͪΌ࣮༻త σβΠϯ΋࣮૷΋γϯϓϧͰ៉ྷ (ͩͬͨ)

  70. erd

  71. erd ERਤΛϒϥ΢β্Ͱΰχϣΰ χϣ͢ΔEngine ඍົʹະ׬

  72. Rails Engine͍͍ΑͶ

  73. hocus_pocus

  74. hocus_pocus Rails Engineͷݶքʹ௅ઓͨ͠
 ҙཉ࡞ υΩϡϝϯτ͕օແͳͷͰͨͿΜ
 ࢖͑ͳ͍ web_consoleΛΠϯεύΠΞͨ͠ͱ ͍͏ྺ࢙తҙٛ

  75. ͦΖͦΖ·ͱΊ

  76. ʮRailsʹ͍ͭͯͷ஌ࣝΛަ׵͠ɺ ೔ʑͷ։ൃʹ໾ཱ͍ͯͯ͜͏ʯ

  77. ͱ͍͏͜ͱͰɺ೔ʑͷ։ൃͷ࿩ Λ͠·ͨ͠

  78. Railsϓϩάϥϛϯά͸ͨͷ͍͠

  79. RailsϓϩάϥϛϯάͰ૲Λ
 ੜ΍ͦ͏ʂ

  80. ଓ͖͸࠙਌ձͰʂ