Slide 1

Slide 1 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ ,BJHJPO3BJMT ॾڮګհ!NPSP

Slide 2

Slide 2 text

,ZPTVLF .030)"4)* !NPSP

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ

Slide 5

Slide 5 text

3BJMTʹ͓͚Δγϯϓϧ͞ w αʔϏεͰ΍Γ͍ͨ͜ͱͱɺهड़͢Δίʔυͷ͕ࠩ 
 গͳ͍ঢ়ଶ͕γϯϓϧ w ؆୯ͳ͜ͱΛ؆୯ʹɺ೉͍͜͠ͱ΋ͦΕͳΓʹ w ͍ΘΏΔίʔυ্ͷʮۮൃతͳෳࡶ͞ʯ͕গͳ͍ঢ়ଶΛ໨ࢦ͢

Slide 6

Slide 6 text

3BJMT͸ෳࡶ͞ΛݮΒͯ͘͠ΕΔ w 3BJMT͸8FCΞϓϦͷۮൃతͳෳࡶ͞ΛݮΒͯ͘͠ΕΔ w 8FCͷϦΫΤετΛΞϓϦέʔγϣϯίʔυʹϧʔςΟϯά͢Δɺͱ͔ w ఆܕతͳ%#ΞΫηε͔Β݁ՌηοτΛΦϒδΣΫτԽ͢Δɺͱ͔ w ͦͷޮՌΛ࠷େݶಘΔͨΊʹ3BJMT͕ಘҙͱ͢ΔΑ͏ͳઃܭʹԊ͏ IUUQTSVCZPOSBJMTPSH

Slide 7

Slide 7 text

3BJMT͕ಘҙͱ͢ΔΑ͏ͳઃܭŪŰ w ΍͸ΓTDBGGPME͕ώϯτʹͳΔ w %#ͷςʔϒϧߏ଄ͱɺը໘ͷߏ଄ɺಛʹೖྗ୯ҐΛ 
 ߹Θͤͯɺ$36%͢Δ

Slide 8

Slide 8 text

TDBGGPMEͷΑ͏ʹ$36% w ;ͭ͏ͷαʔϏε͸ը໘%#Ͱ͸ͳ͍͠ɺ$36%Ͱ͸ ػೳ͕଍Γͳ͍ͷͰ͸ͳ͍͔ w ͦΕ͸ͦ͏ w ͦ͜ΛຒΊͯγϯϓϧʹ͢Δࢹ఺Λ঺հ͍ͨ͠Ͱ͢

Slide 9

Slide 9 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ

Slide 10

Slide 10 text

%#ઃܭʹ͓͚Δ 
 ΠϕϯτΤϯςΟςΟΛݟग़͢

Slide 11

Slide 11 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ w υϝΠϯʹݱΕΔΠϕϯτΤϯςΟςΟΛ ݟग़͢ w ͦΕΛAIBT@NBOZUISPVHIAؔ࿈ͷ 
 ΤϯςΟςΟʹ͢Δ

Slide 12

Slide 12 text

“ • : • 時 存在 、存在 <登録> •名前 持 。 • 扱 「時」 扱 「時」 違 、 瞬間 刻印 、 
 有効 存在 期間 表現 。 • : •繰 返 ⾏ ⾏為。 時起 <記録> •例) ⼊荷、発注、etc •時刻 ( ) 持 。 •多 場合、 使 ⾏ •名前 ( ⾃体 ⾏為 名前 ) 持 %#ઃܭษڧձ λϫʔζΫΤετࣾ࿨ాলೋ͞ΜΛઌੜʹΉ͔͑ͨษڧձͷϝϞ 
 IUUQTHJTUHJUIVCDPNTVOBPU

Slide 13

Slide 13 text

ྫ,BJHJͷΤϯςΟςΟ conferences id name location start_at end_at *timestamps users id name *timestamps registrations id conference_id user_id *timestamps

Slide 14

Slide 14 text

,BJHJͷϦιʔεΤϯςΟςΟ w ΠϕϯτࢀՃొ࿥αʔϏεΛ૝ఆ͢Δ w DPOGFSFODFTͱVTFSTͱ͍͏ϦιʔεΤϯςΟςΟ͕͋Γɺଟରଟͷؔ܎ʹͳΔ w Ϣʔβʔ͸ɺෳ਺ͷΧϯϑΝϨϯεʹࢀՃͰ͖Δ w ΧϯϑΝϨϯε͸ɺෳ਺ͷϢʔβʔ͕ࢀՃͰ͖Δ w 3%#ͰଟରଟΛදݱ͢Δʹ͸ɺ྆ऀΛࢀর͢ΔΤϯςΟςΟΛಋೖ͢Δ conferences id name location start_at end_at *timestamps users id name *timestamps

Slide 15

Slide 15 text

“ ⾃体 独⽴ 
 扱 場合 、中間 join 使 has_many :through 
 設定 。 
 
 何 特別 必要 
 場合 、join 不要 has_and_belongs_to_many 
 使 ⽅ 。 3BJMTΨΠυ"DUJWF3FDPSEͷؔ࿈෇͚ 
 IBT@NBOZUISPVHIͱIBT@BOE@CFMPOHT@UP@NBOZͷͲͪΒΛબͿ͔ IUUQTSBJMTHVJEFTKQBTTPDJBUJPO@CBTJDTIUNM

Slide 16

Slide 16 text

ϦϨʔγϣϯγοϓϞσϧࣗମΛ 
 ಠཱͨ͠ΤϯςΟςΟͱͯ͠ѻ͍͍ͨ w ΠϕϯτΤϯςΟςΟΛݟग़͢͜ͱɺͦΕΛIBT@NBOZUISPVHIͰ 
 ࢖͏͜ͱ͕ɺશମͷγϯϓϧ͞Λอͭͷʹ໾ཱͪ·͢ w ʮϦϨʔγϣϯγοϓϞσϧͰԿ͔ಛผͳ͜ͱΛ͢Δඞཁ͕·ͬͨ͘ͳ͍ ৔߹ʯ͸͘͝গͳ͍ w ϦιʔεΤϯςΟςΟͰଟରଟΛදݱ͢Δ͚ͩͳΒ͋Δ͔΋͠Εͳ͍͚Ͳʜ w ޙड़͢ΔUISPVHIͷػೳڧԽ΋͋Γɺগͳ͘ͱ΋࿩ऀ͸͜͜਺೥·ͬͨ͘IBCUNΛ࢖ͬͯ·ͤΜͶ

Slide 17

Slide 17 text

3BJMTͷؾ࣋ͪʹͳͬͯߟ͑Δ w ࠷ॳͷ࠷ॳ͸IBCUN͜ͱIBT@BOE@CFMPOHT@UP@NBOZؔ࿈͚͕ͩ͋ͬͨ w 3BJMTͷஈ֊ͰɺIBT@NBOZUISPVHI͕௥Ճ͞Εͨ w ͦͷ͋ͱ΋ɺIBT@POFUISPVHI΍CFMPOHT@UPUISPVHIͳͲɺ 
 UISPVHI଒ོ͕੝ΛۃΊ͍ͯΔ w υϝΠϯͷදݱͱͯ͠༏Ε͍ͯΔ ͖ΐ͏͸ͬͪ͜ͷ࿩ w ػೳతʹ΋UISPVHIͷUISPVHIͳͲͰؔ࿈Λ୧ΕΔͷ͕ͪΐ͏ศར͡Όͳ͍Ͱ͔͢ "3εΰΠ

Slide 18

Slide 18 text

ΠϕϯτΤϯςΟςΟΛݟग़ͯ͠ɺ࢖͏ w ΠϕϯτΤϯςΟςΟΛݟग़͠ɺUISPVHIͰࢦఆͯ͠ଟରଟͷؔ܎Λ࡞Δ w ࣮ੈքͷαʔϏεͰ͸ɺ͜ͷΠϕϯτΤϯςΟςΟ͕Ͱ͖Δ͜ͱ͕ɺ 
 ॏཁͳίϯόʔδϣϯϙΠϯτʹͳ͍ͬͯΔ͜ͱ΋ଟ͍ w ྫΧϯϑΝϨϯεࢀՃొ࿥αΠτʹ͓͚Δʮొ࿥ʯ w ΧϯϑΝϨϯεͱϢʔβʔ͸ɺ୯ʹଟରଟͳͷͰͳ͘ʮొ࿥͍ͯ͠Δʯؔ܎͕͋Δͷͩ w ͦͯͦ͠ͷׂʹɺ׳Εͳ͍ͱൃݟͮ͠Β͍ w ࿩ऀ͸ɺӋੜষ༸ʮָʑ&3%Ϩοεϯʯ ᠳӭࣾ Ͱֶͼ·ͨ͠ɻIUUQTXXXTFTIPQDPNQSPEVDUEFUBJM

Slide 19

Slide 19 text

ొ࿥ͨ͠ίτSFHJTUSBUJPOT w 6TFS͕$POGFSFODFʹࢀՃొ࿥ͨ͠ίτɺΛΠϕϯτΤϯςΟςΟͱͯ͠ 
 ه࿥͢Δɻ͜ͷ৔߹SFHJTUSBUJPOͳͲ w ͜Ε͕IBT@NBOZUISPVHIͰࢦఆ͢ΔςʔϒϧʹͳΔɻ w IBCUNͷதؒςʔϒϧͱҧͬͯJEΛ࣋ͭΤϯςΟςΟͱͯ͠ѻ͏ conferences id name location start_at end_at *timestamps users id name *timestamps registrations id conference_id user_id *timestamps

Slide 20

Slide 20 text

ొ࿥ͨ͠ίτSFHJTUSBUJPOT class User < ApplicationRecord has_many :registrations has_many :conferences, through: :registrations end class Registration < ApplicationRecord belongs_to :user belongs_to :conference end conferences id name location start_at end_at *timestamps users id name *timestamps registrations id conference_id user_id *timestamps

Slide 21

Slide 21 text

ΠϕϯτΤϯςΟςΟΛݟग़͢ͱͰ͖Δ͜ͱ UserMailer.registration_accepted(@user, @conference, at: Time.current).deliver_later # => #{@user.name}༷ɺ#{I18n.l(at)}ʹ#{@conference}΁ͷࢀՃΛड͚෇͚·ͨ͠ UserMailer.registration_accepted(@registration).deliver_later w SFHJTUSBUJPOΛݟग़͍ͯ͠ͳ͍৔߹ɺ!VTFSͱ!DPOGFSFODF΍ɺλΠϜελϯϓΛݸผʹ࣋ͪճΔඞཁ͕͋Δ w !VTFS͸΄Μͱʹ!DPOGFSFODFొ࿥͍ͯ͠Δ ࠶νΣοΫͨ͘͠ͳΒͳ͍ w λΠϜελϯϓ΄ΜͱʹDVSSFOUͰ͍͍ ϦτϥΠ͢Δͱ͖Ͳ͏͢Δ w SFHJTUSBUJPO͕͋Ε͹ɺʮొ࿥ͨ͠ίτʯΛίʔυ্Ͱͦͷ··औΓճͤΔ w VTFSͱDPOGFSFODFΛ୧ΕΔɻ྆ऀΛ୧ΕΔ͜ͱ͸ɺ%#ͷࢀর੔߹ੑ੍໿Ͱ΋ࢧ͑ΒΕΔ w SFHJTUSBUJPOTDSFBUFE@BUΛొ࿥೔࣌ͱΈͳͤΔ υϝΠϯͰେࣄͳʮొ࿥ͨ͠ίτʯΛίʔυ্ʹදݱͰ͖Δ

Slide 22

Slide 22 text

ଓΠϕϯτΤϯςΟςΟΛݟग़͢ͱͰ͖Δ͜ͱ w SFHJTUSBUJPOTʹΧϥϜΛ௥Ճͯ͠ɺ෇Ճ৘ใΛ΋ͨͤΒΕΔ w ొ࿥൪߸ͱ͔ɺొ࿥࣌ͷਃ͠ૹΓAOPUFAͱ͔ɺొ࿥छผ ݱ஍ࢀՃYPSΦϯϥΠϯࢀՃ ͱ͔ w ޙଓΠϕϯτͷ਌ϨίʔυʹͳΕΔ w ྫࢀՃඅ༻Λܾࡁͨ͠ίτQBZNFOUT ౰೔ʹࢀՃͨ͠ίτBUUFOEBODFTͳͲ w ACFMPOHT@UPSFHJTUSBUJPOAͳ"3ϞσϧͱͳΔ w ొ࿥ͨ͜͠ͱࣗମΛه࿥Ͱ͖Δ w ؂ࠪϩάʹ࢒ͨ͠Γɺίϯόʔδϣϯܦ࿏ͷϩάʹ࢒ͨ͠Γͱ͔

Slide 23

Slide 23 text

༨ஊ໋໊ʹ໎͏৔߹ w ಈࢺͷ໊ࢺܗΛ࢖͏͜ͱ͕ଟ͍ɻSFHJTUSBUJPOBUUFOEBODF w Ͳ͏ͯ͠΋ͬ͘͠Γ͜ͳ͚Ε͹ݱࡏ෼ࢺΛ͔ͭ͏͜ͱ΋͋ΔSFHJTUFSJOH w ໊લ΋ॏཁɺͳͷ͚ͩͲલఏͱͯ͠ɺ͜ͷ֓೦Λݟग़͢͜ͱ͕΋ͬͱॏཁ w ͳͷͰɺ໊લ͕ࢥ͍͔ͭͳ͍৔߹Ͱ΋ఘΊͳ͍Ͱ w ༨ஊͷ༨ஊͰɺBQQMZͨ͜͠ͱɺΛදݱ͢Δͱ͖ࠔΓ·͢ΑͶɻ"QQMJDBUJPOͯɻ

Slide 24

Slide 24 text

ΠϕϯτΤϯςΟςΟ͔ΒυϝΠϯΛݟฦ͢ w ྫࣔͨ͠ʮΠϕϯτެ։ɾࢀՃొ࿥αʔϏεʯͱ͍͏υϝΠϯʹ͓͍ͯ w ʮొ࿥ʯΠϕϯτ͕ͱͯ΋େࣄͰ͋Δ͜ͱ͕վΊͯཧղͰ͖Δ w "3ͷ༏ΕͨػೳIBT@NBOZUISPVHIΛ׆༻͢ΔઃܭʹΑͬͯɺ 
 υϝΠϯ্ͷେࣄͳग़དྷࣄΛίʔυͰදݱͰ͖͍ͯΔɻ

Slide 25

Slide 25 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ w υϝΠϯʹݱΕΔΠϕϯτΤϯςΟςΟΛ ݟग़͢ w ͦΕΛAIBT@NBOZUISPVHIAؔ࿈ͷ 
 ΤϯςΟςΟʹ͢Δ

Slide 26

Slide 26 text

%#Ͱදݱͨ͠ίτΛ 
 Ϣʔβʔ͕ѻ͑ΔΑ͏ʹ͢Δ

Slide 27

Slide 27 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ w ίτΛ3&45Ϧιʔεͱͯ͠ఆٛ͠ɺ 
 αʔϏεͷػೳΛͦͷ$36%Ͱදݱ͢Δ w ίτͷૢ࡞ͷͨΊͷঢ়ଶભҠ΋ɺ63-΁ͷ ΞΫηεͰදݱ͢Δ

Slide 28

Slide 28 text

3BJMTͷؾ࣋ͪʹͳͬͯߟ͑Δ w ϧʔςΟϯάΛఆٛ͢Δखஈͱͯ͠͸ɺ΍͸ΓDPO fi HSPVUFTSCͰ ASFTPVSDFTA΍ASFTPVSDFAએݴΛ࢖͏ͷ͕͍͍ΜͰ͠ΐ͏Ͷ w ੲ͔ΒҰ؏ͯ͠·͢͠Ͷʜ w ͱ͸͍͑ʮϦιʔεͳΔ΋ͷΛ)551ܦ༝Ͱ$36%͢Δʯͱ͍͏ 
 ϚΠϯυηοτ͕Ή͔͍ͣ͠ w ͳΜ͔ ༨ܭͳ΋ͷΛؚΊ ͨ͘͞ΜϧʔςΟϯάఆٛ͢ΔϚΫϩΈ͍ͨͳѻ͍ʹͳͬͯΔ

Slide 29

Slide 29 text

3&45ͱ3%#ɺϦιʔεͱςʔϒϧ w 3&45Ͱ$36%͢ΔϦιʔεͱςʔϒϧ͸ࣅΔ͜ͱ΋͋Δͷ͸ؒҧ͍ͳ͍ w TDBGGPMEͰੜ੒͢ΔྫͰҰக͍ͤͯ͞Δͷ͸ͦΕ͸ͦ͏ w ͔͠͠%#Λͦͷ··$36%͢Δख๏ɺͰ͸ͳ͍ w Ϧιʔεͱςʔϒϧͷҧ͍͕ൃੜ͢Δͷ΋ͦΕ͸ͦ͏ɻ w ҧ͏͜ͱࣗମͰ೰·ͳ͍Ͱ

Slide 30

Slide 30 text

ίτΛϦιʔεͱͯ͠ѻ͏ resources :conferences do resource :registration, only: [:new, :create] end resources :registrations w ͜ͷྫͰ͸ɺΧϯϑΝϨϯεʹࢀՃొ࿥Ͱ͖Δͷ͸ճ͚ͩొ࿥ܥͷ SFHJTUSBUJPO͸୯਺SFTPVSDF ొ࿥ͷ63-ΛΦγϟϨʹωετ͢ΔͷΛ 
 ΍ΊΔͱ΋ͬͱγϯϓϧʹͰ͖Δ

Slide 31

Slide 31 text

ίτΛϦιʔεͱͯ͠ѻ͏ w લड़ͷྫʮࢀՃొ࿥͢Δ͜ͱSFHJTUSBUJPOʯΛϦιʔεͱͯ͠දݱ͢Δɻ w ࢀՃొ࿥͢ΔSFHJTUSBUJPOTDSFBUF w ྫA1045DPOGFSFODFTLBJHJPOSBJMTSFHJTUSBUJPO w ొ࿥಺༰ͷ֬ೝSFHJTUSBUJPOTTIPX w ྫA(&5SFHJTUSBUJPOTJEA w ొ࿥಺༰ͷߋ৽SFHJTUSBUJPOTVQEBUF

Slide 32

Slide 32 text

ൺֱ༻3&45͡Όͳ͍৔߹ʹΑ͘ݟΔ΍ͭ resources :conferences do # POST /conferences/:conference_id/register # => conferences#register post :register end w A$POGFSFODFT$POUSPMMFSSFHJTUFSAΞΫγϣϯΛఆٛͯ͠͠·͏ w ਺͕૿͑ΔͱϧʔςΟϯά΋ෳࡶͳΔ͠ɺ$POGFSFODFT$POUSPMMFS΋ංେԽ͢Δ

Slide 33

Slide 33 text

ίτΛOFX͢Δ w OFX΍FEJU΁ͷϧʔςΟϯά΋ఆٛ͞ΕΔ͕ɺෆཁͳΒ࢖Θͳͯ͘΋ྑ͍ w ΧϯϑΝϨϯεৄࡉϖʔδ ADPOGFSFODFTTIPXA ͔ΒϘλϯΛԡ͚ͩ͢Ͱొ࿥׬ྃ͢Δ৔߹ɺ ௚઀ASFHJTUSBUJPOTDSFBUFAʹαϒϛοτͯ͠΋Α͍ w ϑΥʔϜΛ+4ͰؤுΔ৔߹΋ಉ༷ʹɺ+4ʹ1045͢΂͖63-Λ౉ͯ͠1045ͤ͞Ε͹Α͍ w ͷͪͷͪొ࿥ը໘͕΄͘͠ͳͬͨΒɺASFHJTUSBUJPOTOFXAΛ࢖͏ w ֬ೝը໘ʮొ࿥ͯ͠ΑΖ͍͠Ͱ͔͢ ʯΈ͍ͨͳͷΛग़͍ͨ͠৔߹ͱ͔ w ࢀՃܗଶ΍උߟͳͲ௥Ճ৘ใͷೖྗ͍ͤͨ͞৔߹ͱ͔

Slide 34

Slide 34 text

ΞϓϦέʔγϣϯঢ়ଶͷભҠ w ΞϓϦέʔγϣϯঢ়ଶͷભҠΛɺίτͷϦιʔεʹ·ͭΘΔϖʔδભҠͰ 
 දݱ͢Δ w ྫʮΧϯϑΝϨϯεৄࡉදࣔʯঢ়ଶͰ͸ɺొ࿥ϘλϯΛදࣔ͢Δɻ 
 ϘλϯΛԡ͢ͱʮొ࿥࣌৘ใͷೖྗ଴ͪʯঢ়ଶʹભҠ͢Δ w ͜ΕΛABAͳϦϯΫΛఏࣔ͢Δ͜ͱɺ 
 ͦΕ୧ͬͯ΋Β͏͜ͱͰදݱ͢Δ w ASFTPVDFTAએݴ͸͜ͷঢ়ଶભҠͷϧʔςΟϯά΋ఆٛͯ͘͠Ε͍ͯΔ

Slide 35

Slide 35 text

͞ΒʹʮίτʯΛϦιʔεͱͯ͠ΈΔ w ࢧ෷͍ͯ͠΄͍͠ࢧ෷͍ͱ͍͏ίτΛ࡞ͬͯཉ͍͠ w A(&5SFHJTUSBUJPOTSFHJTUSBUJPO@JEQBZNFOUOFXAͰࢧ෷͍Ҋ಺Λදࣔ͠ w ͔Βͷɺܾࡁ͍ͨ͡͸ಋઢ͸֎෦αʔϏε࿈ܞ͠ w ໭ͬͯ͘ΔA(&5SFHJTUSBUJPOTSFHJTUSBUJPO@JEQBZNFOUAͰࢧ෷͍׬ྃͷࢫΛදࣔ͢Δ w ༧ఆͷΩϟϯηϧ͸ɺA$BODFMMBUJPOAΛDSFBUF͢Δͱ΋ߟ͑ΒΕΔ͠ɺ A3FHJTUSBUJPOAΛEFTUSPZ͢Δͱ΋ߟ͑ΒΕΔ w ͜ͷ͋ͨΓ΋ΩϟϯηϧϙϦγʔʹΑͬͯߟ͑ΒΕΔ w ର৅αʔϏεʹͱͬͯԿ͕ద੾͔ɺߟ͑·͠ΐ͏ w ࢧ෷͍ͳ͠ͳΒ3FHJTUSBUJPOΛEFTUSPZɺࢧ෷͍ࡁΈͩͬͨΒฦۚϦΫΤετΛOFX͢Δɺͱ͔

Slide 36

Slide 36 text

༨ஊ%#ʹؔ܎ͳ͍ʮίτʯͷ$36% w ϩάΠϯ΍ϩάΞ΢τΛʮηογϣϯͷDSFBUFEFMFUFʯͱͯ͠ 
 දݱ͢Δ׳शɺDPPM͡Όͳ͍Ͱ͢ w ϩάΠϯը໘ͱ͸ͭ·ΓTFTTJPOTOFX͢Δը໘Ͱ͋Γ w ϩάΠϯ͢Δ͜ͱ͸TFTTJPOTDSFBUFͰɺ w ϩάΞ΢τ͢Δͱ͸TFTTJPOTEFTUSPZ͢Δ͜ͱͳͷͩɻ

Slide 37

Slide 37 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ w ίτΛ3&45Ϧιʔεͱͯ͠ఆٛ͠ɺ 
 αʔϏεͷػೳΛͦͷ$36%Ͱදݱ͢Δ w ίτͷૢ࡞ͷͨΊͷঢ়ଶભҠ΋ɺ63-΁ͷ ΞΫηεͰදݱ͢Δ

Slide 38

Slide 38 text

ίτΛ$36%͢Δͱ͖ɺ 6*ͱΠϕϯτΤϯςΟςΟͷ ߏ଄͕ҧͬͨΒͲ͏͢Δ

Slide 39

Slide 39 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ w 3&45GVMͳϑΥʔϜ͔Β΍ͬͯ͘Δ΋ͷͱ %#ͱͷҧ͍Λٵऩ͢Δ w 3BJMT͕ఏڙ͢ΔΠϯλʔϑΣʔεΛ 
 ࢥ͍ඳ͖ͳ͕Βܧଓతʹม͍͑ͯ͘

Slide 40

Slide 40 text

3BJMTͰ3&45GVMͳೖྗΛӬଓԽ͢Δ*' # POST /conferences/:conference_id/registration def create @registration = current_user.registrations.build( conference: Conference.find_by!(name: params[:conference_id]) ) @registration.save! end

Slide 41

Slide 41 text

3BJMTͷؾ࣋ͪʹͳͬͯߟ͑Δ w "3#BTFͷΦϒδΣΫτΛੜ੒͢Δͱ͖ͷΠϯλʔϑΣʔε͕͜Ε w ͷͪʹಉ༷ͷ*'Λ࡞ΔͨΊͷ"DUJWF.PEFM ҎԼ".P ΋ग़͍ͯΔ w ͞Βʹద੾ʹೖྗΛߜΔͨΊͷػߏͱͯ͠4USPOH1BSBNFUFST΋͋Δ w ͍ΖΜͳํ͕ࣜ͋Δ͏ͪɺNBTTBTTJHONFOUͱ૬ੑͷྑ͍΍͕ͭ࠾༻͞Εͨ ΤϯτϦϙΠϯτʹBUUSJCVUFTͷ)BTI ͷΑ͏ͳ΋ͷ Λ౉ͯ͠ 
 NBTTBTTJHONFOU͠ɺϑΝαʔυΛݺͿͷ͕جຊߏ଄

Slide 42

Slide 42 text

ྫ͑͹ొ࿥࣌ʹऔΔ৘ใΛ૿΍͢ def create @registration = current_user.registrations.build( conference: Conference.find_by!(name: params[:conference_id]), **params.require(:r10n).permit(:note, :attend_type) ) @registration.save! end උߟ OPUF ͱࢀՃछผ BUUFOE@UZQF*/@1&340/c0/-*/& ͱΛ 
 ೖྗՄೳʹͯ͠ΈΔ w ༨ஊ"$1BSBNFUFSTUP@IBTIΛͰ౉ͯ͠ύϥϝʔλΛ௥Ճ͢Δ΍ͭɺॻ͖ຯ͕ྑͯ͘޷͖Ͱ͢ SOʹSFHJTUSBUJPOͷུͰ͢

Slide 43

Slide 43 text

͞ΒʹલޙॲཧΛ͸͞Έ͍ͨ৔߹ w લޙॲཧ͕ඞཁͳ৔߹͕͋Δɻͨͱ͑͹ w */@1&340/ͷ৔߹ɺࢀՃ࿮ͷ֬ೝͱҾ౰ॲཧΛ͢Δ w ਃࠐऀຊਓʹɺड෇ϝʔϧΛૹΔ w ओ࠵ऀʹɺਃ͠ࠐΈ௨஌ϝʔϧΛૹΔ w ͜ΕΛͲ͏࣮ݱ͢Δ͔ɻ

Slide 44

Slide 44 text

ίϯτϩʔϥͰ΍ͬͯ΋͍͍͚Ͳʜ def create @registration = current_user.registrations.build( conference: Conference.find_by!(name: params[:conference_id]), **params.require(:r10n).permit(:note, :attend_type) ) @registration.save! UserMailer.registration_accepted(@registration).deliver_later OrganizerMailer.registration_accepted(@registration).deliver_later if @registration.attend_type.in_person? SeatAllocationJob.perform_later(@registration) … rescue ActiveRecord::RecordInvalid => ex ... end

Slide 45

Slide 45 text

".PΛ࢖ͬͯ*'ͷ͍ۙผϨΠϠΛಋೖ͢Δ w ίϯετϥΫλʹɺBUUSJCVUFTͷ)BTIΛ౉͢ w ͦͷΦϒδΣΫτͰ͸ೖྗηοτͷଥ౰ੑΛݕূ͢Δ w ೖྗ͕ଥ౰Ͱͳ͍৔߹ɺαʔϏεར༻ऀʹݟͤΒΕΔΤϥʔϝοηʔδΛੜ੒͢Δ w ଥ౰Ͱ͋Δ৔߹ɺ΍Γ͍ͨॲཧͷϑΝαʔυͱͳΔϝιουΛ࣮ߦ͢Δ w ͭ·ΓϑΥʔϜΦϒδΣΫτͱ͍͏͔αʔϏεΫϥεͱ͍͏͔ͷಋೖ w ϑΥʔϜͱݺশ͢Δ΄͏͕޷Έ w ͜ͷ૚΁ͷೖྗ͸ɺϢʔβʔೖྗͷܗɺ͢ͳΘͪϑΥʔϜͱҰக͓ͤͯ͘͞ͱָͩͱࢥ͏ͨΊ w ࣮༻্͸੒Ռ෺ͷू໿ϧʔτͱͳΔΦϒδΣΫτ΁ͷΞΫηα΋͋Δͱศར

Slide 46

Slide 46 text

def create @form = RegistrationForm.new( user: current_user:, conference: Conference.find_by!(name: params[:conference_id]) **params.require(:r10n).permit(:note, :attend_type) ) @form.call redirect_to form.registration rescue ... ".PΛ࢖ͬͯ*'ͷ͍ۙผϨΠϠΛಋೖ͢Δ ʮ3FHJTUSBUJPO'PSN͸ొ࿥ϑΥʔϜΛද͢ΦϒδΣΫτͰ͢ʯ

Slide 47

Slide 47 text

class RegistrationForm < ApplicationForm attribute :user, :conference, :note, :attend_type validates :attend_type, inclusion: {in: ...} attr_reader :registration def call @registration = user.registration.create!(...) notify_registration! if @registration.attend_type.in_person? SeatAllocationJob.perform_later(@registration) ".PΛ࢖ͬͯ*'ͷ͍ۙผϨΠϠΛಋೖ͢Δ ".P.PEFMͱ͔".P"UUSJCVUFͱ͔Λ JODMVEFͨ͠ബ͍εʔύʔΫϥε

Slide 48

Slide 48 text

͓͓ΉͶ;ͭ͏ͷ3VCZ0CKFDU w ".PΛ࢖ͬͯΔͷͰ1MBJO0MEͱ͸ݴ͑ͳ͍͔΋͠Εͳ͍͚Ͳ w Ͱ΋;ͭ͏ͷ3VCZΦϒδΣΫτͱͯ͠ѻ͍΍͍͢Ͱ͢ΑͶ w ίϯετϥΫλʹɺBUUSJCVUFTͷ)BTIΛ౉͢ w ΍Γ͍ͨॲཧͷϑΝαʔυͱͳΔϝιουΛ࣮ߦ͢Δ w ͔ͦ͜Β͞ΒʹෳࡶʹͳͬͨΒ3VCZͱͯ͠ෳࡶ͞ʹ޲͖߹͑͹ྑ͍ w ΈΜͳେ޷͖03.Ͱ͋Δ"DUJWF3FDPSE΋࢖͑Δ

Slide 49

Slide 49 text

;ͭ͏ͷ30ͳͷͰࣗಈςετ΋ॻ͖΍͍͢ w "SSBOHFηοτΞοϓ w ίϯετϥΫλʹɺBUUSJCVUFTͷ)BTIΛ౉͢ w "DUॲཧ࣮ߦ w ϑΝαʔυΛݺͼग़ͯ͠ॲཧͷҰ࿈͕૸Δ w "TTFSU݁Ռݕূ w ࡞Γ͍ͨσʔλͷू໿ϧʔτʹΞΫηεͰ͖ΔͷͰɺ 
 ͔ͦ͜ΒҰ࿈ͷσʔλάϥϑ͕ҙਤ௨ΓͰ͖͍ͯΔ͔ΛݕূͰ͖Δ w όϦσʔγϣϯΤϥʔʹͳΔೖྗύλʔϯ΋௥Ճ͠΍͍͢ w ޙॲཧ͕࣮ߦ͞ΕΔ͔ͳͲ΋ςετͰ͖Δ

Slide 50

Slide 50 text

ίτͷDSFBUFͱ%#ӬଓԽͱͷؒ w 3FHJTUSBUJPOT$POUSPMMFSDSFBUFΛड͚ΔΞΫγϣϯͱͯ͠ɺ 
 */4&35JOUPSFHJTUSBUJPOTҎ֎ͷ͜ͱ·Ͱ΍͍͍ͬͯͷ w ͦͷαʔϏεͷ੹຿ͱͯ͠ʮࢀՃొ࿥͢Δ͜ͱʯ෇ਵ͢ΔॲཧͰ͋Ε͹΍͍͍ͬͯ w Ή͠Ζ΍Δ΂͖ w 3FHJTUSBUJPOϦιʔεͷDSFBUF͸ɺʰαʔϏεར༻ऀͷߟ͑Δʮొ࿥͢Δ͜ͱʯʱΛද͍ͯ͠Δ w ҧ࿨ײ͕ग़͖ͯͨΒɺίʔυͷ༷ࢠΛΈͯநग़͍ͯ͘͠ w 3VCZͳͷͰ w ΠϯλʔϑΣʔε͕҆ఆ͓ͯ͠Γςετ΋ॆ࣮ͤ͞΍͍͢ͷͰɺϦϑΝΫλϦϯά͠΍͍͢͸ͣ

Slide 51

Slide 51 text

ඞͣ͠΋શ෦Λͭͷ'0ʹೖΕͳ͘ͱ΋ྑ͍ w ॻ͍ͯΈΔͱɺϑΥʔϜΦϒδΣΫτʹ͢΂ͯΛ٧ΊΔʹ͸ҧ࿨ײ͕ 
 ͋Δ͜ͱ΋͋Δ w ΍ͬͺΓϝʔϧ͸ίϯτϩʔϥͰૹΓͨ͘ͳΔ͔΋͠Εͳ͍ɺͱ͔ w ॻ͍ͨ౰ॳ͸ྑͯ͘΋ɺػೳ௥ՃͰมΘͬͯ͘Δ͜ͱ΋͋Δ w ෼͚ͨ͘ͳͬͨͱ͖΋ɺॊೈʹநग़͍ͯ͘͠ w 3VCZͳͷͰ w ΠϯλʔϑΣʔε͕҆ఆ͓ͯ͠Γςετ΋ॆ࣮ͤ͞΍͍͢ͷͰɺϦϑΝΫλϦϯά͠΍͍͢͸ͣ

Slide 52

Slide 52 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ w 3&45GVMͳϑΥʔϜ͔Β΍ͬͯ͘Δ΋ͷͱ %#ͱͷҧ͍Λٵऩ͢Δ w 3BJMT͕ఏڙ͢ΔΠϯλʔϑΣʔεΛ 
 ࢥ͍ඳ͖ͳ͕Βܧଓతʹม͍͑ͯ͘

Slide 53

Slide 53 text

4JNQMJDJUZPO3BJMT ɹ3%# ɹ3&45 ɹ3VCZ

Slide 54

Slide 54 text

3BJMTͷؾ࣋ͪʹԊ͏ͱɺγϯϓϧʹ࣮૷Ͱ͖Δ w ΠϕϯτΤϯςΟςΟΛݟग़ͯ͠3%#ʹදݱ͠ɺIBT@NBOZUISPVHIͳ 
 "3Ϟσϧͱͯ͠ɺҰڃʹѻ͏ w ΠϕϯτΤϯςΟςΟʹ୅ද͞ΕΔʮίτʯΛ3&45Ϧιʔεͱͯ͠ଊ͑ 
 ΍Γ͍ͨ͜ͱΛͦͷ$36%ૢ࡞Ͱදݱ͢Δ w 3BJMT͕ఏڙ͢ΔΠϯλʔϑΣʔεΛࢥ͍ඳ͖ɺ"3΍".Pɺ 
 3VCZͷॊೈੑΛ׆͔ͯ͠ܧଓతʹ։ൃɾϦϑΝΫλϦϯά͍ͯ͘͠