Skip to content

Commit

Permalink
deps: update example dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jun 3, 2014
1 parent 492e933 commit 9e5a758
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions examples/mvc/controllers/pet/views/edit.jade
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
link(rel='stylesheet', href='/style.css')
h1= pet.name
form(action='/pet/#{pet.id}', method='post')
input(type='hidden', name='_method', value='put')
form(action='/pet/#{pet.id}?_method=put', method='post')
label= 'Name: '
input(type='text', name='pet[name]', value=pet.name)
input(type='submit', value='Update')
3 changes: 1 addition & 2 deletions examples/mvc/controllers/user/views/edit.jade
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
link(rel='stylesheet', href='/style.css')
h1= user.name
form(action='/user/#{user.id}', method='post')
input(type='hidden', name='_method', value='put')
form(action='/user/#{user.id}?_method=put', method='post')
label= 'Name: '
input(type='text', name='user[name]', value='#{user.name}')
input(type='submit', value='Update')
Expand Down
4 changes: 2 additions & 2 deletions examples/mvc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ app.use(session());
// parse request bodies (req.body)
app.use(bodyParser());

// override methods (put, delete)
app.use(methodOverride());
// allow overriding methods in query (?_method=put)
app.use(methodOverride('_method'));

// expose the "messages" local variable when views are rendered
app.use(function(req, res, next){
Expand Down
1 change: 1 addition & 0 deletions examples/route-separation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var user = require('./user');
app.set('view engine', 'jade');
app.set('views', __dirname + '/views');
app.use(logger('dev'));
app.use(methodOverride('_method'));
app.use(cookieParser());
app.use(bodyParser());
app.use(express.static(__dirname + '/public'));
Expand Down
3 changes: 1 addition & 2 deletions examples/route-separation/views/users/edit.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ extends ../layout
block content
h1 Editing #{user.name}
#user
form(method="post")
input(type="hidden", value="put", name="_method")
form(action="?_method=put", method="post")
p Name:
input(type="text", value= user.name, name="user[name]")
p Email:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
"marked": "0.3.2",
"multiparty": "~3.2.4",
"hjs": "~0.0.6",
"body-parser": "1.2.2",
"body-parser": "1.3.0",
"cookie-parser": "1.1.0",
"express-session": "1.2.1",
"method-override": "1.0.2",
"method-override": "2.0.1",
"morgan": "1.1.1",
"vhost": "1.0.0"
},
Expand Down

0 comments on commit 9e5a758

Please sign in to comment.