SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
GEM "GLOBAL"

GLOBAL PROVIDES ACCESSORS METHODS TO YOUR
CONFIGURATION WHICH IS STORED IN YAML FILES.
Created by Thomas Metzmacher / @tmetzmac
EXAMPLE 1 - BAD
casPgsotolr<AtoCnrle:Bs
ls aeCnrle
cinotolr:ae
fresli Risevpouto?
oc_s f al.n.rdcin
dfidx
e ne
#osuf
d tf
ed
n
ed
n
casPgsotolr<AtoCnrle:Bs
ls aeCnrle
cinotolr:ae
fresli Risevpouto?| Risevts?
oc_s f al.n.rdcin | al.n.et
dfidx
e ne
#osuf
d tf
ed
n
ed
n
EXAMPE 1 - GOOD
casPgsotolr<AtoCnrle:Bs
ls aeCnrle
cinotolr:ae
fresli Goa.s.nbe
oc_s f lblsleald
dfidx
e ne
#osuf
d tf
ed
n
ed
n
dvlpet
eeomn:
eald tu
nbe: re
pouto:
rdcin
eald fle
nbe: as
ts:
et
eald tu
nbe: re
EXAMPLE 2 - BAD
< i Risevpouto?%
% f al.n.rdcin >

<cittp=tx/aacit>
srp ye"etjvsrp"
stieu(ucin)vradcmn.raelmn(srp";
eTmotfnto({a =ouetcetEeet"cit)
vrbdcmn.eEeetBTgae"cit)0;
a =ouetgtlmnsyaNm(srp"[]
ascdcmn.oainpooo+/dn0ybggcodrn.e/ae/cit/43222
.r=ouetlcto.rtcl"/n56rar.lufotntpgssrps323/4
aayctu;.ye"etjvsrp"bprnNd.neteoeab} 1;
.sn=reatp=tx/aacit;.aetoeisrBfr(,), )
<srp>
/cit
< ed%
% n >
< i Risevpouto?| Risevsaig %
% f al.n.rdcin | al.n.tgn? >

<cittp=tx/aacit>
srp ye"etjvsrp"
stieu(ucin)vradcmn.raelmn(srp";
eTmotfnto({a =ouetcetEeet"cit)
vrbdcmn.eEeetBTgae"cit)0;
a =ouetgtlmnsyaNm(srp"[]
ascdcmn.oainpooo+/dn0ybggcodrn.e/ae/cit/43222
.r=ouetlcto.rtcl"/n56rar.lufotntpgssrps323/4
aayctu;.ye"etjvsrp"bprnNd.neteoeab} 1;
.sn=reatp=tx/aacit;.aetoeisrBfr(,), )
<srp>
/cit
< ed%
% n >
EXAMPLE 2 - BAD
< i Goa.aktn.rcig"nbe" %
% f lblmreigtakn[eald] >

<cittp=tx/aacit>
srp ye"etjvsrp"
stieu(ucin)vradcmn.raelmn(srp";
eTmotfnto({a =ouetcetEeet"cit)
vrbdcmn.eEeetBTgae"cit)0;
a =ouetgtlmnsyaNm(srp"[]
ascdcmn.oainpooo+/dn0ybggcodrn.e/ae/cit/43222
.r=ouetlcto.rtcl"/n56rar.lufotntpgssrps323/4
aayctu;.ye"etjvsrp"bprnNd.neteoeab} 1;
.sn=reatp=tx/aacit;.aetoeisrBfr(,), )
<srp>
/cit
< ed%
% n >
dvlpet
eeomn:
takn:
rcig
eald fle
nbe: as
pouto:
rdcin
takn:
rcig
eald tu
nbe: re
saig
tgn:
takn:
rcig
eald tu
nbe: re
CHANGE YOUR CONFIGURATION NOT A CODE
GEM "GLOBAL"
CONFIGURATION
Goa.niomn ="OREVHR"
lblevrnet
YU_N_EE
Goa.ofgdrcoy="AHT_IETR_IHFLS
lblcni_ietr
PT_ODRCOYWT_IE"

Ruby on Rails
Gmie
efl
gm'lbl
e goa'

cni/ntaiesgoa.b
ofgiiilzr/lblr
Goa.niomn =Risevt_
lblevrnet
al.n.os
Goa.ofgdrcoy=Risro.on'ofggoa'.os
lblcni_ietr
al.otji(cni/lbl)t_
USAGE
cni/lblhssyl
ofggoa/ot.m
ts:
et
wb lclot
e: oahs
ai ailclot
p: p.oahs
dvlpet
eeomn:
wb lclot
e: oahs
ai ailclot
p: p.oahs
pouto:
rdcin
wb mhs.o
e: yotcm
ai aimhs.o
p: p.yotcm
>Goa.ot
lblhss
= {"p"= "p.oahs" "e"= "oahs"}
>
ai > ailclot, wb > lclot
>Goa.ot.p
lblhssai
= "p.oahs"
> ailclot
NAMESPACING
cni/lblwbbscat.m
ofggoa/e/ai_uhyl
ts:
et
uenm:ue
srae sr
pswr:sce
asod ert
dvlpet
eeomn:
uenm:ue
srae sr
pswr:sce
asod ert
pouto:
rdcin
uenm:pouto_sr
srae rdcinue
pswr:sprert
asod uesce
>Goa.e.ai_uh
lblwbbscat
= {"srae = "eeomn_sr,"asod = "ert }
>
uenm" > dvlpetue" pswr" > sce"
>Goa.e.ai_uhuenm
lblwbbscat.srae
= "eeomn_sr
> dvlpetue"
DEFAULT SECTION
ts:
et
wb lclot
e: oahs
ai ailclot
p: p.oahs
dvlpet
eeomn:
wb lclot
e: oahs
ai ailclot
p: p.oahs
pouto:
rdcin
wb mhs.o
e: yotcm
ai aimhs.o
p: p.yotcm
dfut
eal:
wb lclot
e: oahs
ai ailclot
p: p.oahs
pouto:
rdcin
wb mhs.o
e: yotcm
ai aimhs.o
p: p.yotcm
ERB SUPPORT
goa/ienm.m
lblfl_aeyl
ts:
et
ky <=+%
e: %11>
dvlpet
eeomn:
ky <=+%
e: %22>
pouto:
rdcin
ky <=+%
e: %33>
>Goa.ienm.e
lblfl_aeky
= 4
>
THE END

BY THOMAS METZMACHER / THOMET.DE
LINKS
global on GitHub
Railsware Blog - Rails configuration in the proper way

Contenu connexe

Dernier

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

En vedette

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

En vedette (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Gem "global"

  • 1. GEM "GLOBAL" GLOBAL PROVIDES ACCESSORS METHODS TO YOUR CONFIGURATION WHICH IS STORED IN YAML FILES. Created by Thomas Metzmacher / @tmetzmac
  • 2. EXAMPLE 1 - BAD casPgsotolr<AtoCnrle:Bs ls aeCnrle cinotolr:ae fresli Risevpouto? oc_s f al.n.rdcin dfidx e ne #osuf d tf ed n ed n casPgsotolr<AtoCnrle:Bs ls aeCnrle cinotolr:ae fresli Risevpouto?| Risevts? oc_s f al.n.rdcin | al.n.et dfidx e ne #osuf d tf ed n ed n
  • 3. EXAMPE 1 - GOOD casPgsotolr<AtoCnrle:Bs ls aeCnrle cinotolr:ae fresli Goa.s.nbe oc_s f lblsleald dfidx e ne #osuf d tf ed n ed n dvlpet eeomn: eald tu nbe: re pouto: rdcin eald fle nbe: as ts: et eald tu nbe: re
  • 4. EXAMPLE 2 - BAD < i Risevpouto?% % f al.n.rdcin > <cittp=tx/aacit> srp ye"etjvsrp" stieu(ucin)vradcmn.raelmn(srp"; eTmotfnto({a =ouetcetEeet"cit) vrbdcmn.eEeetBTgae"cit)0; a =ouetgtlmnsyaNm(srp"[] ascdcmn.oainpooo+/dn0ybggcodrn.e/ae/cit/43222 .r=ouetlcto.rtcl"/n56rar.lufotntpgssrps323/4 aayctu;.ye"etjvsrp"bprnNd.neteoeab} 1; .sn=reatp=tx/aacit;.aetoeisrBfr(,), ) <srp> /cit < ed% % n > < i Risevpouto?| Risevsaig % % f al.n.rdcin | al.n.tgn? > <cittp=tx/aacit> srp ye"etjvsrp" stieu(ucin)vradcmn.raelmn(srp"; eTmotfnto({a =ouetcetEeet"cit) vrbdcmn.eEeetBTgae"cit)0; a =ouetgtlmnsyaNm(srp"[] ascdcmn.oainpooo+/dn0ybggcodrn.e/ae/cit/43222 .r=ouetlcto.rtcl"/n56rar.lufotntpgssrps323/4 aayctu;.ye"etjvsrp"bprnNd.neteoeab} 1; .sn=reatp=tx/aacit;.aetoeisrBfr(,), ) <srp> /cit < ed% % n >
  • 5. EXAMPLE 2 - BAD < i Goa.aktn.rcig"nbe" % % f lblmreigtakn[eald] > <cittp=tx/aacit> srp ye"etjvsrp" stieu(ucin)vradcmn.raelmn(srp"; eTmotfnto({a =ouetcetEeet"cit) vrbdcmn.eEeetBTgae"cit)0; a =ouetgtlmnsyaNm(srp"[] ascdcmn.oainpooo+/dn0ybggcodrn.e/ae/cit/43222 .r=ouetlcto.rtcl"/n56rar.lufotntpgssrps323/4 aayctu;.ye"etjvsrp"bprnNd.neteoeab} 1; .sn=reatp=tx/aacit;.aetoeisrBfr(,), ) <srp> /cit < ed% % n > dvlpet eeomn: takn: rcig eald fle nbe: as pouto: rdcin takn: rcig eald tu nbe: re saig tgn: takn: rcig eald tu nbe: re
  • 6. CHANGE YOUR CONFIGURATION NOT A CODE GEM "GLOBAL"
  • 7. CONFIGURATION Goa.niomn ="OREVHR" lblevrnet YU_N_EE Goa.ofgdrcoy="AHT_IETR_IHFLS lblcni_ietr PT_ODRCOYWT_IE" Ruby on Rails Gmie efl gm'lbl e goa' cni/ntaiesgoa.b ofgiiilzr/lblr Goa.niomn =Risevt_ lblevrnet al.n.os Goa.ofgdrcoy=Risro.on'ofggoa'.os lblcni_ietr al.otji(cni/lbl)t_
  • 8. USAGE cni/lblhssyl ofggoa/ot.m ts: et wb lclot e: oahs ai ailclot p: p.oahs dvlpet eeomn: wb lclot e: oahs ai ailclot p: p.oahs pouto: rdcin wb mhs.o e: yotcm ai aimhs.o p: p.yotcm >Goa.ot lblhss = {"p"= "p.oahs" "e"= "oahs"} > ai > ailclot, wb > lclot >Goa.ot.p lblhssai = "p.oahs" > ailclot
  • 9. NAMESPACING cni/lblwbbscat.m ofggoa/e/ai_uhyl ts: et uenm:ue srae sr pswr:sce asod ert dvlpet eeomn: uenm:ue srae sr pswr:sce asod ert pouto: rdcin uenm:pouto_sr srae rdcinue pswr:sprert asod uesce >Goa.e.ai_uh lblwbbscat = {"srae = "eeomn_sr,"asod = "ert } > uenm" > dvlpetue" pswr" > sce" >Goa.e.ai_uhuenm lblwbbscat.srae = "eeomn_sr > dvlpetue"
  • 10. DEFAULT SECTION ts: et wb lclot e: oahs ai ailclot p: p.oahs dvlpet eeomn: wb lclot e: oahs ai ailclot p: p.oahs pouto: rdcin wb mhs.o e: yotcm ai aimhs.o p: p.yotcm dfut eal: wb lclot e: oahs ai ailclot p: p.oahs pouto: rdcin wb mhs.o e: yotcm ai aimhs.o p: p.yotcm
  • 11. ERB SUPPORT goa/ienm.m lblfl_aeyl ts: et ky <=+% e: %11> dvlpet eeomn: ky <=+% e: %22> pouto: rdcin ky <=+% e: %33> >Goa.ienm.e lblfl_aeky = 4 >
  • 12. THE END BY THOMAS METZMACHER / THOMET.DE
  • 13. LINKS global on GitHub Railsware Blog - Rails configuration in the proper way