Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornharrtell committed Jul 8, 2012
1 parent f77253c commit cf54c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resources/rows.coffee
Expand Up @@ -23,7 +23,7 @@ module.exports = (server) ->
values.push if typeof v is "string" then "'#{v}'" else v
fields = fields.join ','
values = values.join ','
sql = "INSERT INTO #{req.params.tableName} (" + fields + ") VALUES (" + values + ") RETURNING id"
sql = "INSERT INTO #{req.params.tableName} (#{fields}) VALUES (#{values}) RETURNING id"
db.query sql, res, (result) ->
res.contentType 'application/json'
id = result.rows[0].id
Expand Down

0 comments on commit cf54c18

Please sign in to comment.