Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use shorter CoffeeScript hash when variable name is the same as the k…

…ey name.
  • Loading branch information...
commit 112f95d591dc650307dbfb08013c7d6eaec20c5e 1 parent c7cae31
Geoffrey Grosenbach authored

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +7 7 app/controllers/users.coffee
14 app/controllers/users.coffee
@@ -2,27 +2,27 @@ Users = ->
2 2 @respondsWith = ['html', 'json', 'js', 'txt']
3 3
4 4 @index = (req, resp, params) ->
5   - @respond({params: params})
  5 + @respond {params}
6 6
7 7 @add = (req, resp, params) ->
8   - @respond({params: params})
  8 + @respond {params}
9 9
10 10 @create = (req, resp, params) ->
11 11 # Save the resource, then display index page
12   - @redirect({controller: @name})
  12 + @redirect {controller: @name}
13 13
14 14 @show = (req, resp, params) ->
15   - @respond({params: params})
  15 + @respond {params}
16 16
17 17 @edit = (req, resp, params) ->
18   - @respond({params: params})
  18 + @respond {params}
19 19
20 20 @update = (req, resp, params) ->
21 21 # Save the resource, then display the item page
22   - @redirect({controller: @name, id: params.id})
  22 + @redirect {controller: @name, id: params.id}
23 23
24 24 @remove = (req, resp, params) ->
25   - @respond({params: params})
  25 + @respond {params}
26 26
27 27 # IMPORTANT! You must return @ as the last line of the function.
28 28 @

0 comments on commit 112f95d

Please sign in to comment.
Something went wrong with that request. Please try again.