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

Rails講義 第17回

Rails講義 第17回

scaffoldでつくるサンプルアプリ
一番ちいさなRailsアプリつくり

Kuniaki IGARASHI

October 10, 2012
Tweet

More Decks by Kuniaki IGARASHI

Other Decks in Technology

Transcript

  1. 3BJMT*OTUBMMFS 3BJMTΠϯετʔϥʔΛ %PXOMPBEɺ*OTUBMM IUUQSBJMTJOTUBMMFSPSH ໊લͱFNBJMΛೖྗ ެ։͞Ε·͢ɻ HJUIVC΍ΞϓϦެ։࣌ʹ࢖ΘΕ·͢ɻެ։͞Εͨ͘ͳ͍ਓ͸χοΫωʔ ϜͳͲΛ࢖͍ͬͯͩ͘͞ɻ ىಈ 8JOEPXT

    8JOEPXTϝχϡʔ͔ΒҎԼΛ࣮ߦ ʮϓϩάϥϜͱϑΝΠϧͷݕࡧʯ͔Β$PNNBOE1SPNQUXJUI3VCZBOE3BJMTPS ελʔτˠશͯͷϓϩάϥϜˠ3BJMT*OTUBMMFSˠ$PNNBOE1SPNQUXJUI3VCZBOE3BJMT ىಈ .BD ΞϓϦέʔγϣϯϢʔςΟϦςΟλʔϛφϧBQQΛىಈ
  2. 3BJMTΞϓϦΛͭ͘Δ SBJMTOFXTBNQMF@BQQ ུ SBJMTOFXΞϓϦ໊ Ͱ3BJMTΞϓϦΛ࡞Γ·͢ɻ 3BJMT͕ඞཁͳϑΝΠϧΛ ͨ͘͞ΜHFOFSBUF͠·͢ɻ ը໘ʹදࣔ͞ΕΔͷ͸HFOFSBUF ͞ΕͨϑΝΠϧ܈Ͱ͢ɻ ͦͷޙɺඞཁͳHFNΛࣗಈͰηο

    τΞοϓ͠·͢ɻ ͪΐͬͱ͔͔࣌ؒΓ·͢ɻ ్தͰ&OUFSZPVSQBTTXPSEUP JOTUBMMUIFCVOEMFE3VCZ(FNTUP ZPVSTZTUFN ͱݴΘΕͨΒύιίϯͷύεϫʔυΛೖྗ͠ ͍ͯͩ͘͞ɻ
  3. DEIFMMPXPSME CVOEMFFYFDSBJMTHDPOUSPMMFSIFMMPJOEFY Ұ൪খ͞ͳ3BJMTΞϓϦͭ͘Γ 3BJMT3PPU΁Ҡಈͯ͠ϖʔδͷͻͳ͕ͨΛͭ͘Δ IUUQMPDBMIPTUIFMMPJOEFY ϒϥ΢β͔ΒҎԼͷ63-ʹΞΫηε͢Δ IFMMPXPSMEΛදࣔ͢ΔΞϓϦΛ࡞Γ·͢ɻ CVOEMFFYFDSBJMTT SBJMTOFXIFMMPXPSME 3BJMTΞϓϦΛͭ͘Δ

    8FCαʔόΛىಈ͢Δ H͸HFOFSBUFͷུͰ͢ɻίϚϯυͷҙຯ͸ޙ൒Ͱઆ໌͠·͢ɻ ଧͪؒҧ͑ͯ࡟আ͍ͨ͠৔߹͸ɺHͷ୅ΘΓʹEͰ࡟আͰ͖·͢ɻ ˞ऴྃ͸$USM D ऴྃ͠ͳ͍৔߹ɺ$USM 1"64&Λࢼ͍ͯͩ͘͠͞ɻʣ T͸TFSWFSͷུɻ
  4. DEIFMMPXPSME Ұ൪খ͞ͳ3BJMTΞϓϦͭ͘Γ 3BJMT3PPU΁Ҡಈͯ͠ϖʔδͷͻͳ͕ͨΛͭ͘Δ IUUQMPDBMIPTUIFMMPJOEFY ϒϥ΢β͔ΒҎԼͷ63-ʹΞΫηε͢Δ IFMMPXPSMEΛදࣔ͢ΔΞϓϦΛ࡞Γ·͢ɻ CVOEMFFYFDSBJMTT SBJMTOFXIFMMPXPSME 3BJMTΞϓϦΛͭ͘Δ 8FCαʔόΛىಈ͢Δ

    H͸HFOFSBUFͷུͰ͢ɻίϚϯυͷҙຯ͸ޙ൒Ͱઆ໌͠·͢ɻ ଧͪؒҧ͑ͯ࡟আ͍ͨ͠৔߹͸ɺHͷ୅ΘΓʹEͰ࡟আͰ͖·͢ɻ ˞ऴྃ͸$USM D ऴྃ͠ͳ͍৔߹ɺ$USM 1"64&Λࢼ͍ͯͩ͘͠͞ɻʣ T͸TFSWFSͷུɻ CVOEMFFYFDSBJMTHDPOUSPMMFSIFMMPJOEFY ‏ੜ੒ ‏ੜ੒
  5. SBJMTOFXIFMMPXPSME IFMMPXPSME BQQ NPEFMT DPOUSPMMFST WJFXT DPOpH  SPVUFTSC ‏ΞϓϦ໊ͷϑΥϧμ

    3BJMTΞϓϦ ͷجຊతͳ ϑΥϧμͱ ϑΝΠϧ܈ ҎԼͷϑΥϧμɾϑΝΠϧ͕ੜ੒͞Ε·͢ɻ Ұ෦ͷΈൈਮ
  6. IFMMPXPSME BQQ NPEFMT DPOUSPMMFST WJFXT DPOpH SPVUFTSC ҎԼͷϑΥϧμɾϑΝΠϧ͕ੜ੒ɾมߋ͞Ε·͢ɻ Ұ෦ͷΈൈਮ CVOEMFFYFDSBJMTHDPOUSPMMFSIFMMPJOEFY

    JOEFYIUNMFSC IFMMP@DPOUSPMMFSSC IFMMP IUUQMPDBMIPTUIFMMPJOEFY IFMMPJOEFYϖʔδΛ දࣔ͢ΔͨΊͷϑΝΠϧ܈Λ ੜ੒͠·͢ɻ ‏͍Ζ͍ΖͳॲཧΛߦ͏Օॴ ‏දࣔΛߦ͏Օॴ ‏63-ͱίϯτϩʔϥͷରԠද
  7. 3BJMT"QQ Ϩεϙϯε)5.- 3PVUFT $POUSPMMFS 7JFX 3PVUFT $POUSPMMFS 7JFXͷͭͷ෦඼Λ௨ա͠·͢ɻ ϦΫΤετ 63-IUUQMPDBMIPTUIFMMPJOEFY

    )551ϝιουɿ(&5 SPVUFTSC IFMMP@DPOUSPMMFSSCJOEFYΞΫγϣϯ IFMMPJOEFYIUNMFSC 3BJMTΞϓϦ͕ϦΫΤετΛड͚ͯ ϨεϙϯεΛฦ͢·ͰͷྲྀΕ
  8. $POUSPMMFS ͞·͟·ͳॲཧΛߦ͍ɺͭ͗ͷ7JFXʹॲཧΛ౉͠·͢ɻ )FMMP$POUSPMMFSͷιʔε͸ BQQDPOUSPMMFSTIFMMP@DPOUSPMMFSSCͰ͢ɻ DMBTT)FMMP$POUSPMMFS"QQMJDBUJPO$POUSPMMFS EFGJOEFY !UJNF5JNFOPX FOE FOE BQQDPOUSPMMFSTIFMMP@DPOUSPMMFSSC

    ϙΠϯτ͸ɺ7JFXʹσʔλΛ౉͢ࡍ͸ɺΠϯελϯεม਺ !͸͡·Γͷม਺ʣ Λ࢖͏͜ͱͰ͢ɻ͜͜Ͱ͸ɺ!UJNF͕࣍ͷ7JFX΁౉͞Ε·͢ɻ ‎࣍͸7JFX BQQWJFXTIFMMPJOEFYIUNMFSC ʹॲཧ͕౉Γ·͢ɻ