Skip to content

Commit ceee7ad

Browse files
committed
Changed all weather partial context name from partials.weather to partials.weatherContext. Fixes EthanRBrown#24.
1 parent b02728a commit ceee7ad

File tree

28 files changed

+42
-42
lines changed

28 files changed

+42
-42
lines changed

ch07/meadowlark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function getWeatherData(){
6060
// middleware to add weather data to context
6161
app.use(function(req, res, next){
6262
if(!res.locals.partials) res.locals.partials = {};
63-
res.locals.partials.weather = getWeatherData();
63+
res.locals.partials.weatherContext = getWeatherData();
6464
next();
6565
});
6666

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="weatherWidget">
2-
{{#each partials.weather.locations}}
2+
{{#each partials.weatherContext.locations}}
33
<div class="location">
44
<h3>{{name}}</h3>
55
<a href="{{forecastUrl}}">
@@ -8,4 +8,4 @@
88
</div>
99
{{/each}}
1010
<small>Source: <a href="http://www.wunderground.com">Weather Underground</a></small>
11-
</div>
11+
</div>

ch08-jquery-file-upload/meadowlark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function getWeatherData(){
6363
// middleware to add weather data to context
6464
app.use(function(req, res, next){
6565
if(!res.locals.partials) res.locals.partials = {};
66-
res.locals.partials.weather = getWeatherData();
66+
res.locals.partials.weatherContext = getWeatherData();
6767
next();
6868
});
6969

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="weatherWidget">
2-
{{#each partials.weather.locations}}
2+
{{#each partials.weatherContext.locations}}
33
<div class="location">
44
<h3>{{name}}</h3>
55
<a href="{{forecastUrl}}">
@@ -8,4 +8,4 @@
88
</div>
99
{{/each}}
1010
<small>Source: <a href="http://www.wunderground.com">Weather Underground</a></small>
11-
</div>
11+
</div>

ch08/meadowlark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function getWeatherData(){
6262
// middleware to add weather data to context
6363
app.use(function(req, res, next){
6464
if(!res.locals.partials) res.locals.partials = {};
65-
res.locals.partials.weather = getWeatherData();
65+
res.locals.partials.weatherContext = getWeatherData();
6666
next();
6767
});
6868

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="weatherWidget">
2-
{{#each partials.weather.locations}}
2+
{{#each partials.weatherContext.locations}}
33
<div class="location">
44
<h3>{{name}}</h3>
55
<a href="{{forecastUrl}}">
@@ -8,4 +8,4 @@
88
</div>
99
{{/each}}
1010
<small>Source: <a href="http://www.wunderground.com">Weather Underground</a></small>
11-
</div>
11+
</div>

ch09/meadowlark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function getWeatherData(){
7979
// middleware to add weather data to context
8080
app.use(function(req, res, next){
8181
if(!res.locals.partials) res.locals.partials = {};
82-
res.locals.partials.weather = getWeatherData();
82+
res.locals.partials.weatherContext = getWeatherData();
8383
next();
8484
});
8585

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="weatherWidget">
2-
{{#each partials.weather.locations}}
2+
{{#each partials.weatherContext.locations}}
33
<div class="location">
44
<h3>{{name}}</h3>
55
<a href="{{forecastUrl}}">
@@ -8,4 +8,4 @@
88
</div>
99
{{/each}}
1010
<small>Source: <a href="http://www.wunderground.com">Weather Underground</a></small>
11-
</div>
11+
</div>

ch10/meadowlark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function getWeatherData(){
7979
// middleware to add weather data to context
8080
app.use(function(req, res, next){
8181
if(!res.locals.partials) res.locals.partials = {};
82-
res.locals.partials.weather = getWeatherData();
82+
res.locals.partials.weatherContext = getWeatherData();
8383
next();
8484
});
8585

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="weatherWidget">
2-
{{#each partials.weather.locations}}
2+
{{#each partials.weatherContext.locations}}
33
<div class="location">
44
<h3>{{name}}</h3>
55
<a href="{{forecastUrl}}">
@@ -8,4 +8,4 @@
88
</div>
99
{{/each}}
1010
<small>Source: <a href="http://www.wunderground.com">Weather Underground</a></small>
11-
</div>
11+
</div>

0 commit comments

Comments
 (0)