Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Lint corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
hkjels committed Jun 5, 2012
1 parent c9b18bc commit 2cd30fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/crud.js
Expand Up @@ -48,9 +48,9 @@ Resource.prototype.index = function (req, res) {
* Displays a form for creating new instances
*/

Resource.prototype.new = function (req, res) {
Resource.prototype['new'] = function (req, res) {
var form = friendly(this.Model)
form.name = Model.modelName.toLowerCase()
form.name = this.Model.modelName.toLowerCase()
res.render('form', {'form': form})
}

Expand Down Expand Up @@ -95,7 +95,7 @@ Resource.prototype.edit = function (req, res) {
var instance = en.singularize(this.Model.modelName).toLowerCase()
, model = req[instance]
, form = friendly(model)
form.name = Model.modelName.toLowerCase()
form.name = this.Model.modelName.toLowerCase()
res.render('form', {'form': form})
}

Expand Down Expand Up @@ -155,7 +155,8 @@ Resource.prototype.load = function (req, id, cb) {

app.crud = function (name, actions, opts) {
var options = actions || {}
, res
, res
, Model

for (var model in mongoose.models) {
if (!mongoose.models.hasOwnProperty(model)) continue
Expand Down

0 comments on commit 2cd30fe

Please sign in to comment.