Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Railsのサービスで特別対応をしたときの話

Keisuke KITA
September 21, 2014

 Railsのサービスで特別対応をしたときの話

Keisuke KITA

September 21, 2014
Tweet

More Decks by Keisuke KITA

Other Decks in Technology

Transcript

  1. RailsͷαʔϏεͰ

    ಛผରԠΛͨ͠ͱ͖ͷ࿩

    View full-size slide

  2. kitak
    twitter.com/kitak

    github.com/kitak

    ~ 2013 ੴ઒ߴઐ, kanazawa.rb
    2013.4 (.0ϖύϘʹ৽ଔೖࣾ
    ৽ଔݚम➞46;63*➞Χϥʔϛʔγϣοϓ 46;63*

    View full-size slide

  3. https://suzuri.jp

    View full-size slide

  4. ͝ར༻ࣄྫ

    View full-size slide

  5. ͋Γ͕ͱ͏͍͟͝·͢

    View full-size slide

  6. 46;63*ͷٕज़
    Ruby (Rails4.1)
    Backbone.js
    Node.js

    View full-size slide

  7. http://pepabo.com/recruit/interview/201406_01

    View full-size slide

  8. ੜ׆ൃදձ

    View full-size slide

  9. RailsͷαʔϏεͰ

    ಛผରԠΛͨ͠ͱ͖ͷ࿩

    View full-size slide

  10. lಛผରԠz

    View full-size slide

  11. ίϥϘاըɾΩϟϯϖʔϯ

    View full-size slide

  12. ಛผରԠ
    ಛఆͷϢʔβʔ͚ͩ
    !
    ൢചͰ͖Δݸ਺Λ੍ݶ͍ͨ͠
    ܦཧతͳ౎߹Ͱച্ͷѻ͍Λม͑Δ
    ϖʔδʹදࣔ͢Δ಺༰ΛҰൠϢʔβʔ
    ͱҟͳΔ΋ͷʹ͢Δ

    FUDʜ

    View full-size slide

  13. Ұॹʹ΍Δ͜ͱʹ
    ͳͬͨΑʂ

    View full-size slide

  14. ͋Γ͕ͪͳίʔυ

    View full-size slide

  15. Ұॹʹ΍Δ͜ͱʹ
    ͳͬͨΑʂ

    View full-size slide

  16. ͋Γ͕ͪͳίʔυ

    View full-size slide

  17. Ұॹʹ΍Δ͜ͱʹ
    ͳͬͨΑʂ

    View full-size slide

  18. ͋ͪͪ͜ͷϞσϧ΍
    ϏϡʔʹɺϢʔβͷ
    ෼ذॲཧ͕ࢄΒ͹Δ

    View full-size slide

  19. اը΍Ωϟϯϖʔϯ͕

    ऴΘͬͨޙʹରԠͷ

    ίʔυΛফ͢ͷ͕େม

    View full-size slide

  20. ͻͱͭͷاըͷதͰɺ

    ෳ਺ͷରԠΛ͓͜ͳ͍ͬͯ
    Δ৔߹ʹ

    ରԠͷશ༰͕೺Ѳͮ͠Β͍

    View full-size slide

  21. Ͱ΋ɺ͔ͤͬ͘ͷ

    ͓࿩ͳͷͰɺΑ͠ͳ
    ʹରԠ͍ͨ͠

    View full-size slide

  22. Ͳ͏͢Ε͹Α͍͔

    View full-size slide

  23. ίϥϘاը΍Ωϟϯϖʔϯ
    Ͱ͓͜ͳ͏มߋΛҰՕॴ
    ʹू໿͢Ε͹Α͍ͷͰ͸

    View full-size slide

  24. ͻͱͭͷϑΝΠϧ 

    Ϟδϡʔϧʹ

    zಛผରԠzͱ͍͏ؔ৺ࣄ

    Λ෼཭͢Δ

    View full-size slide

  25. TipsΛ͍͔ͭ͘

    ͝঺հ͠·͢

    View full-size slide

  26. lಛผରԠzϞδϡʔϧͷ
    ϝιουͰɺطଘͷϞ
    σϧͷϝιουΛϥο
    ϐϯά͢Δ

    View full-size slide

  27. Module#prepend

    View full-size slide

  28. Object
    MyClass
    superclass
    include
    prepend

    View full-size slide

  29. Object
    MyClass
    superclass
    include
    prepend
    ModuleA

    View full-size slide

  30. Object
    MyClass
    superclass
    include
    prepend
    ModuleA
    ModuleB

    View full-size slide

  31. include͸Ϋϥεʹରͯ͠
    ৽ͨͳػೳΛఏڙ͢Δ
    prepend͸طʹଘࡏ͢Δػ
    ೳΛมߋ͢Δ

    View full-size slide

  32. έʔε

    ಛఆͷϢʔβʔͷ঎඼ͷൢച
    ݸ਺ʹ੍ݶΛઃ͚Δͱ͖

    View full-size slide

  33. ؾΛ͚ͭΔ͜ͱ

    View full-size slide

  34. ෳ਺ͷϞδϡʔϧΛ

    ಉҰͷΫϥεʹ

    prepend͢Δࡍʹ

    ઌͷมߋʹӨڹ͸ͳ͍͔ɺ

    ڝ߹͠ͳ͍͔

    View full-size slide

  35. deface by spree

    View full-size slide

  36. ςϯϓϨʔτΛہॴతʹ

    ΦʔόʔϥΠυͰ͖Δgem

    View full-size slide

  37. I/FX1PTUI
    I৽ن౤ߘI
    BQQWJFXTQPTUT@GPSNIUNMFSC
    BQQWJFXTQPTUT@GPSNIUNMFSC

    View full-size slide

  38. έʔε

    Ϣʔβʔͷϖʔδͷݟͤ
    ํΛม͍͑ͨ

    View full-size slide

  39. ௨ৗ ಛผରԠ

    View full-size slide

  40. lಛผରԠzΛͻͱͭͷϑΝΠϧʹ·ͱΊΔ

    View full-size slide

  41. ؾΛ͚ͭΔ͜ͱ

    View full-size slide

  42. $44ηϨΫλͰมߋ͢ΔՕॴΛࢦఆ
    ͢ΔͷͰɺϏϡʔͷมߋʹऑ͍

    ˝

    request spec 

    feature specͰΧόʔ

    View full-size slide

  43. ·ͱΊ
    lಛผରԠzΛҰՕॴʹूΊΔ
    Rubyʹ͸ɺRubyͦͷ΋ͷͷॊ
    ೈੑͱ༏ΕͨΤίγεςϜ͕͋
    Δ

    ➞ԯ߷ͳ͜ͱ΋ָ͘͠Ͱ͖Δ

    View full-size slide

  44. We are hiring!

    View full-size slide

  45. We are hiring!

    View full-size slide

  46. ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ

    View full-size slide