poptart 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/Gemfile.lock +4 -3
 - data/lib/poptart/model.rb +49 -1
 - data/lib/poptart/question.rb +1 -2
 - data/lib/poptart/request.rb +1 -1
 - data/lib/poptart/root.rb +0 -5
 - data/lib/poptart/survey.rb +5 -6
 - data/lib/poptart/survey_question.rb +2 -1
 - data/lib/poptart/user.rb +16 -12
 - data/lib/poptart.rb +2 -1
 - data/lib/version.rb +1 -1
 - data/poptart.gemspec +1 -0
 - data/spec/requests/answering_survey_questions_spec.rb +32 -9
 - data/spec/requests/root_spec.rb +6 -3
 - data/spec/requests/user_management_spec.rb +8 -8
 - data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +5444 -274
 - data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +10066 -450
 - data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +883 -69
 - data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +665 -56
 - data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +1072 -74
 - data/spec/vcr/answering/survey_questions_returns_all_answered_survey_questions_for_a_question.yml +5009 -0
 - data/spec/vcr/poptart/root/builds_top_level_uri.yml +72 -0
 - data/spec/vcr/poptart/root/builds_urls.yml +72 -0
 - data/spec/vcr/user/management_creates_a_user.yml +63 -0
 - data/spec/vcr/user/management_returns_a_user.yml +201 -14
 - metadata +22 -2
 
| 
         @@ -1,11 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            http_interactions:
         
     | 
| 
       3 
3 
     | 
    
         
             
            - request:
         
     | 
| 
       4 
     | 
    
         
            -
                method:  
     | 
| 
       5 
     | 
    
         
            -
                uri: http://localhost:3000/
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: http://localhost:3000/api/users
         
     | 
| 
       6 
6 
     | 
    
         
             
                body:
         
     | 
| 
       7 
     | 
    
         
            -
                  encoding:  
     | 
| 
       8 
     | 
    
         
            -
                  string: ''
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: '{"user":{"external_user_id":42}}'
         
     | 
| 
       9 
9 
     | 
    
         
             
                headers:
         
     | 
| 
       10 
10 
     | 
    
         
             
                  User-Agent:
         
     | 
| 
       11 
11 
     | 
    
         
             
                  - Faraday v0.9.0
         
     | 
| 
         @@ -19,8 +19,8 @@ http_interactions: 
     | 
|
| 
       19 
19 
     | 
    
         
             
                  - "*/*"
         
     | 
| 
       20 
20 
     | 
    
         
             
              response:
         
     | 
| 
       21 
21 
     | 
    
         
             
                status:
         
     | 
| 
       22 
     | 
    
         
            -
                  code:  
     | 
| 
       23 
     | 
    
         
            -
                  message: ' 
     | 
| 
      
 22 
     | 
    
         
            +
                  code: 201
         
     | 
| 
      
 23 
     | 
    
         
            +
                  message: 'Created '
         
     | 
| 
       24 
24 
     | 
    
         
             
                headers:
         
     | 
| 
       25 
25 
     | 
    
         
             
                  X-Frame-Options:
         
     | 
| 
       26 
26 
     | 
    
         
             
                  - SAMEORIGIN
         
     | 
| 
         @@ -33,48 +33,41 @@ http_interactions: 
     | 
|
| 
       33 
33 
     | 
    
         
             
                  Content-Type:
         
     | 
| 
       34 
34 
     | 
    
         
             
                  - application/json; charset=utf-8
         
     | 
| 
       35 
35 
     | 
    
         
             
                  Etag:
         
     | 
| 
       36 
     | 
    
         
            -
                  - '" 
     | 
| 
      
 36 
     | 
    
         
            +
                  - '"430a6d2f346c4d2092de2d6fa50364e2"'
         
     | 
| 
       37 
37 
     | 
    
         
             
                  Cache-Control:
         
     | 
| 
       38 
38 
     | 
    
         
             
                  - max-age=0, private, must-revalidate
         
     | 
| 
       39 
39 
     | 
    
         
             
                  X-Request-Id:
         
     | 
| 
       40 
     | 
    
         
            -
                  -  
     | 
| 
      
 40 
     | 
    
         
            +
                  - 34e2a402-a661-424b-a24a-d33a86cd3713
         
     | 
| 
       41 
41 
     | 
    
         
             
                  X-Runtime:
         
     | 
| 
       42 
     | 
    
         
            -
                  - '0. 
     | 
| 
      
 42 
     | 
    
         
            +
                  - '0.009264'
         
     | 
| 
       43 
43 
     | 
    
         
             
                  Server:
         
     | 
| 
       44 
44 
     | 
    
         
             
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
       45 
45 
     | 
    
         
             
                  Date:
         
     | 
| 
       46 
     | 
    
         
            -
                  -  
     | 
| 
      
 46 
     | 
    
         
            +
                  - Tue, 09 Sep 2014 23:20:54 GMT
         
     | 
| 
       47 
47 
     | 
    
         
             
                  Content-Length:
         
     | 
| 
       48 
     | 
    
         
            -
                  - ' 
     | 
| 
      
 48 
     | 
    
         
            +
                  - '130'
         
     | 
| 
       49 
49 
     | 
    
         
             
                  Connection:
         
     | 
| 
       50 
50 
     | 
    
         
             
                  - Keep-Alive
         
     | 
| 
       51 
51 
     | 
    
         
             
                body:
         
     | 
| 
       52 
52 
     | 
    
         
             
                  encoding: UTF-8
         
     | 
| 
       53 
53 
     | 
    
         
             
                  string: |-
         
     | 
| 
       54 
54 
     | 
    
         
             
                    {
         
     | 
| 
      
 55 
     | 
    
         
            +
                      "id": 50,
         
     | 
| 
      
 56 
     | 
    
         
            +
                      "external_user_id": 42,
         
     | 
| 
       55 
57 
     | 
    
         
             
                      "_links": {
         
     | 
| 
       56 
58 
     | 
    
         
             
                        "self": {
         
     | 
| 
       57 
     | 
    
         
            -
                          "href": "http://localhost:3000/api"
         
     | 
| 
       58 
     | 
    
         
            -
                        },
         
     | 
| 
       59 
     | 
    
         
            -
                        "surveys": {
         
     | 
| 
       60 
     | 
    
         
            -
                          "href": "http://localhost:3000/api/surveys"
         
     | 
| 
       61 
     | 
    
         
            -
                        },
         
     | 
| 
       62 
     | 
    
         
            -
                        "users": {
         
     | 
| 
       63 
     | 
    
         
            -
                          "href": "http://localhost:3000/api/users"
         
     | 
| 
       64 
     | 
    
         
            -
                        },
         
     | 
| 
       65 
     | 
    
         
            -
                        "questions": {
         
     | 
| 
       66 
     | 
    
         
            -
                          "href": "http://localhost:3000/api/questions"
         
     | 
| 
      
 59 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/users/50"
         
     | 
| 
       67 
60 
     | 
    
         
             
                        }
         
     | 
| 
       68 
61 
     | 
    
         
             
                      }
         
     | 
| 
       69 
62 
     | 
    
         
             
                    }
         
     | 
| 
       70 
63 
     | 
    
         
             
                http_version: 
         
     | 
| 
       71 
     | 
    
         
            -
              recorded_at:  
     | 
| 
      
 64 
     | 
    
         
            +
              recorded_at: Tue, 09 Sep 2014 23:20:54 GMT
         
     | 
| 
       72 
65 
     | 
    
         
             
            - request:
         
     | 
| 
       73 
66 
     | 
    
         
             
                method: post
         
     | 
| 
       74 
     | 
    
         
            -
                uri: http://localhost:3000/api/ 
     | 
| 
      
 67 
     | 
    
         
            +
                uri: http://localhost:3000/api/surveys
         
     | 
| 
       75 
68 
     | 
    
         
             
                body:
         
     | 
| 
       76 
69 
     | 
    
         
             
                  encoding: UTF-8
         
     | 
| 
       77 
     | 
    
         
            -
                  string: '{" 
     | 
| 
      
 70 
     | 
    
         
            +
                  string: '{"survey":{"user_id":50}}'
         
     | 
| 
       78 
71 
     | 
    
         
             
                headers:
         
     | 
| 
       79 
72 
     | 
    
         
             
                  User-Agent:
         
     | 
| 
       80 
73 
     | 
    
         
             
                  - Faraday v0.9.0
         
     | 
| 
         @@ -102,35 +95,582 @@ http_interactions: 
     | 
|
| 
       102 
95 
     | 
    
         
             
                  Content-Type:
         
     | 
| 
       103 
96 
     | 
    
         
             
                  - application/json; charset=utf-8
         
     | 
| 
       104 
97 
     | 
    
         
             
                  Etag:
         
     | 
| 
       105 
     | 
    
         
            -
                  - '" 
     | 
| 
      
 98 
     | 
    
         
            +
                  - '"241f67aedbc8e18828f8194ccc3e5b98"'
         
     | 
| 
       106 
99 
     | 
    
         
             
                  Cache-Control:
         
     | 
| 
       107 
100 
     | 
    
         
             
                  - max-age=0, private, must-revalidate
         
     | 
| 
       108 
101 
     | 
    
         
             
                  X-Request-Id:
         
     | 
| 
       109 
     | 
    
         
            -
                  -  
     | 
| 
      
 102 
     | 
    
         
            +
                  - 51db76ec-eb9c-4489-b2d9-37b1c18bfa69
         
     | 
| 
       110 
103 
     | 
    
         
             
                  X-Runtime:
         
     | 
| 
       111 
     | 
    
         
            -
                  - '0. 
     | 
| 
      
 104 
     | 
    
         
            +
                  - '0.010127'
         
     | 
| 
       112 
105 
     | 
    
         
             
                  Server:
         
     | 
| 
       113 
106 
     | 
    
         
             
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
       114 
107 
     | 
    
         
             
                  Date:
         
     | 
| 
       115 
     | 
    
         
            -
                  -  
     | 
| 
      
 108 
     | 
    
         
            +
                  - Tue, 09 Sep 2014 23:20:54 GMT
         
     | 
| 
       116 
109 
     | 
    
         
             
                  Content-Length:
         
     | 
| 
       117 
     | 
    
         
            -
                  - ' 
     | 
| 
      
 110 
     | 
    
         
            +
                  - '246'
         
     | 
| 
      
 111 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 112 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 113 
     | 
    
         
            +
                body:
         
     | 
| 
      
 114 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 115 
     | 
    
         
            +
                  string: |-
         
     | 
| 
      
 116 
     | 
    
         
            +
                    {
         
     | 
| 
      
 117 
     | 
    
         
            +
                      "id": 41,
         
     | 
| 
      
 118 
     | 
    
         
            +
                      "user_id": 50,
         
     | 
| 
      
 119 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 120 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 121 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/surveys/41"
         
     | 
| 
      
 122 
     | 
    
         
            +
                        },
         
     | 
| 
      
 123 
     | 
    
         
            +
                        "submit": {
         
     | 
| 
      
 124 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/surveys/41/survey_questions"
         
     | 
| 
      
 125 
     | 
    
         
            +
                        }
         
     | 
| 
      
 126 
     | 
    
         
            +
                      },
         
     | 
| 
      
 127 
     | 
    
         
            +
                      "survey_questions": [
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                      ]
         
     | 
| 
      
 130 
     | 
    
         
            +
                    }
         
     | 
| 
      
 131 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 132 
     | 
    
         
            +
              recorded_at: Tue, 09 Sep 2014 23:20:54 GMT
         
     | 
| 
      
 133 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 134 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 135 
     | 
    
         
            +
                uri: http://localhost:3000/api/http:%2F%2Flocalhost:3000%2Fapi%2F%252Fusers%2F/
         
     | 
| 
      
 136 
     | 
    
         
            +
                body:
         
     | 
| 
      
 137 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 138 
     | 
    
         
            +
                  string: '{"user":{"external_user_id":42}}'
         
     | 
| 
      
 139 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 140 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 141 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 142 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 143 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 144 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 145 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 146 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 147 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 148 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 149 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 150 
     | 
    
         
            +
              response:
         
     | 
| 
      
 151 
     | 
    
         
            +
                status:
         
     | 
| 
      
 152 
     | 
    
         
            +
                  code: 404
         
     | 
| 
      
 153 
     | 
    
         
            +
                  message: 'Not Found '
         
     | 
| 
      
 154 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 155 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 156 
     | 
    
         
            +
                  - text/html; charset=utf-8
         
     | 
| 
      
 157 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 158 
     | 
    
         
            +
                  - '16625'
         
     | 
| 
      
 159 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 160 
     | 
    
         
            +
                  - 3abda252-5531-4618-9544-e5d1f2984201
         
     | 
| 
      
 161 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 162 
     | 
    
         
            +
                  - '0.019517'
         
     | 
| 
      
 163 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 164 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 165 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 166 
     | 
    
         
            +
                  - Sat, 13 Sep 2014 15:26:48 GMT
         
     | 
| 
      
 167 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 168 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 169 
     | 
    
         
            +
                body:
         
     | 
| 
      
 170 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 171 
     | 
    
         
            +
                  string: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\"
         
     | 
| 
      
 172 
     | 
    
         
            +
                    />\n  <title>Action Controller: Exception caught</title>\n  <style>\n    body
         
     | 
| 
      
 173 
     | 
    
         
            +
                    {\n      background-color: #FAFAFA;\n      color: #333;\n      margin: 0px;\n
         
     | 
| 
      
 174 
     | 
    
         
            +
                    \   }\n\n    body, p, ol, ul, td {\n      font-family: helvetica, verdana,
         
     | 
| 
      
 175 
     | 
    
         
            +
                    arial, sans-serif;\n      font-size:   13px;\n      line-height: 18px;\n    }\n\n
         
     | 
| 
      
 176 
     | 
    
         
            +
                    \   pre {\n      font-size: 11px;\n      white-space: pre-wrap;\n    }\n\n
         
     | 
| 
      
 177 
     | 
    
         
            +
                    \   pre.box {\n      border: 1px solid #EEE;\n      padding: 10px;\n      margin:
         
     | 
| 
      
 178 
     | 
    
         
            +
                    0px;\n      width: 958px;\n    }\n\n    header {\n      color: #F0F0F0;\n
         
     | 
| 
      
 179 
     | 
    
         
            +
                    \     background: #C52F24;\n      padding: 0.5em 1.5em;\n    }\n\n    h1 {\n
         
     | 
| 
      
 180 
     | 
    
         
            +
                    \     margin: 0.2em 0;\n      line-height: 1.1em;\n      font-size: 2em;\n
         
     | 
| 
      
 181 
     | 
    
         
            +
                    \   }\n\n    h2 {\n      color: #C52F24;\n      line-height: 25px;\n    }\n\n
         
     | 
| 
      
 182 
     | 
    
         
            +
                    \   .details {\n      border: 1px solid #D0D0D0;\n      border-radius: 4px;\n
         
     | 
| 
      
 183 
     | 
    
         
            +
                    \     margin: 1em 0px;\n      display: block;\n      width: 978px;\n    }\n\n
         
     | 
| 
      
 184 
     | 
    
         
            +
                    \   .summary {\n      padding: 8px 15px;\n      border-bottom: 1px solid #D0D0D0;\n
         
     | 
| 
      
 185 
     | 
    
         
            +
                    \     display: block;\n    }\n\n    .details pre {\n      margin: 5px;\n      border:
         
     | 
| 
      
 186 
     | 
    
         
            +
                    none;\n    }\n\n    #container {\n      box-sizing: border-box;\n      width:
         
     | 
| 
      
 187 
     | 
    
         
            +
                    100%;\n      padding: 0 1.5em;\n    }\n\n    .source * {\n      margin: 0px;\n
         
     | 
| 
      
 188 
     | 
    
         
            +
                    \     padding: 0px;\n    }\n\n    .source {\n      border: 1px solid #D9D9D9;\n
         
     | 
| 
      
 189 
     | 
    
         
            +
                    \     background: #ECECEC;\n      width: 978px;\n    }\n\n    .source pre
         
     | 
| 
      
 190 
     | 
    
         
            +
                    {\n      padding: 10px 0px;\n      border: none;\n    }\n\n    .source .data
         
     | 
| 
      
 191 
     | 
    
         
            +
                    {\n      font-size: 80%;\n      overflow: auto;\n      background-color: #FFF;\n
         
     | 
| 
      
 192 
     | 
    
         
            +
                    \   }\n\n    .info {\n      padding: 0.5em;\n    }\n\n    .source .data .line_numbers
         
     | 
| 
      
 193 
     | 
    
         
            +
                    {\n      background-color: #ECECEC;\n      color: #AAA;\n      padding: 1em
         
     | 
| 
      
 194 
     | 
    
         
            +
                    .5em;\n      border-right: 1px solid #DDD;\n      text-align: right;\n    }\n\n
         
     | 
| 
      
 195 
     | 
    
         
            +
                    \   .line {\n      padding-left: 10px;\n    }\n\n    .line:hover {\n      background-color:
         
     | 
| 
      
 196 
     | 
    
         
            +
                    #F6F6F6;\n    }\n\n    .line.active {\n      background-color: #FFCCCC;\n
         
     | 
| 
      
 197 
     | 
    
         
            +
                    \   }\n\n    a { color: #980905; }\n    a:visited { color: #666; }\n    a:hover
         
     | 
| 
      
 198 
     | 
    
         
            +
                    { color: #C52F24; }\n\n      #route_table {\n    margin: 0 auto 0;\n    border-collapse:
         
     | 
| 
      
 199 
     | 
    
         
            +
                    collapse;\n  }\n\n  #route_table td {\n    padding: 0 30px;\n  }\n\n  #route_table
         
     | 
| 
      
 200 
     | 
    
         
            +
                    tr.bottom th {\n    padding-bottom: 10px;\n    line-height: 15px;\n  }\n\n
         
     | 
| 
      
 201 
     | 
    
         
            +
                    \ #route_table .matched_paths {\n    background-color: LightGoldenRodYellow;\n
         
     | 
| 
      
 202 
     | 
    
         
            +
                    \ }\n\n  #route_table .matched_paths {\n    border-bottom: solid 3px SlateGrey;\n
         
     | 
| 
      
 203 
     | 
    
         
            +
                    \ }\n\n  #path_search {\n    width: 80%;\n    font-size: inherit;\n  }\n\n
         
     | 
| 
      
 204 
     | 
    
         
            +
                    \ </style>\n\n  <script>\n    var toggle = function(id) {\n      var s = document.getElementById(id).style;\n
         
     | 
| 
      
 205 
     | 
    
         
            +
                    \     s.display = s.display == 'none' ? 'block' : 'none';\n      return false;\n
         
     | 
| 
      
 206 
     | 
    
         
            +
                    \   }\n    var show = function(id) {\n      document.getElementById(id).style.display
         
     | 
| 
      
 207 
     | 
    
         
            +
                    = 'block';\n    }\n    var hide = function(id) {\n      document.getElementById(id).style.display
         
     | 
| 
      
 208 
     | 
    
         
            +
                    = 'none';\n    }\n    var toggleTrace = function() {\n      return toggle('blame_trace');\n
         
     | 
| 
      
 209 
     | 
    
         
            +
                    \   }\n    var toggleSessionDump = function() {\n      return toggle('session_dump');\n
         
     | 
| 
      
 210 
     | 
    
         
            +
                    \   }\n    var toggleEnvDump = function() {\n      return toggle('env_dump');\n
         
     | 
| 
      
 211 
     | 
    
         
            +
                    \   }\n  </script>\n</head>\n<body>\n\n<header>\n  <h1>Routing Error</h1>\n</header>\n<div
         
     | 
| 
      
 212 
     | 
    
         
            +
                    id=\"container\">\n  <h2>No route matches [POST] "/api/http%3A%2F%2Flocalhost%3A3000%2Fapi%2F%252Fusers%2F"</h2>\n\n
         
     | 
| 
      
 213 
     | 
    
         
            +
                    \ \n<p><code>Rails.root: /Users/austenito/repos/happiness/happiness_service</code></p>\n\n<div
         
     | 
| 
      
 214 
     | 
    
         
            +
                    id=\"traces\">\n    <a href=\"#\" onclick=\"hide('Framework-Trace');hide('Full-Trace');show('Application-Trace');;
         
     | 
| 
      
 215 
     | 
    
         
            +
                    return false;\">Application Trace</a> |\n    <a href=\"#\" onclick=\"hide('Application-Trace');hide('Full-Trace');show('Framework-Trace');;
         
     | 
| 
      
 216 
     | 
    
         
            +
                    return false;\">Framework Trace</a> |\n    <a href=\"#\" onclick=\"hide('Application-Trace');hide('Framework-Trace');show('Full-Trace');;
         
     | 
| 
      
 217 
     | 
    
         
            +
                    return false;\">Full Trace</a> \n\n    <div id=\"Application-Trace\" style=\"display:
         
     | 
| 
      
 218 
     | 
    
         
            +
                    block;\">\n      <pre><code></code></pre>\n    </div>\n    <div id=\"Framework-Trace\"
         
     | 
| 
      
 219 
     | 
    
         
            +
                    style=\"display: none;\">\n      <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
         
     | 
| 
      
 220 
     | 
    
         
            +
                    `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
         
     | 
| 
      
 221 
     | 
    
         
            +
                    `call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
         
     | 
| 
      
 222 
     | 
    
         
            +
                    (4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
         
     | 
| 
      
 223 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
         
     | 
| 
      
 224 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
         
     | 
| 
      
 225 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
         
     | 
| 
      
 226 
     | 
    
         
            +
                    (4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
         
     | 
| 
      
 227 
     | 
    
         
            +
                    `call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
         
     | 
| 
      
 228 
     | 
    
         
            +
                    (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
         
     | 
| 
      
 229 
     | 
    
         
            +
                    (1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
         
     | 
| 
      
 230 
     | 
    
         
            +
                    `call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
         
     | 
| 
      
 231 
     | 
    
         
            +
                    (4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
         
     | 
| 
      
 232 
     | 
    
         
            +
                    `call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
         
     | 
| 
      
 233 
     | 
    
         
            +
                    (1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
         
     | 
| 
      
 234 
     | 
    
         
            +
                    `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
         
     | 
| 
      
 235 
     | 
    
         
            +
                    `run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
         
     | 
| 
      
 236 
     | 
    
         
            +
                    `block in start_thread'</code></pre>\n    </div>\n    <div id=\"Full-Trace\"
         
     | 
| 
      
 237 
     | 
    
         
            +
                    style=\"display: none;\">\n      <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
         
     | 
| 
      
 238 
     | 
    
         
            +
                    `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
         
     | 
| 
      
 239 
     | 
    
         
            +
                    `call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
         
     | 
| 
      
 240 
     | 
    
         
            +
                    (4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
         
     | 
| 
      
 241 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
         
     | 
| 
      
 242 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
         
     | 
| 
      
 243 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
         
     | 
| 
      
 244 
     | 
    
         
            +
                    (4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
         
     | 
| 
      
 245 
     | 
    
         
            +
                    `call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
         
     | 
| 
      
 246 
     | 
    
         
            +
                    (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
         
     | 
| 
      
 247 
     | 
    
         
            +
                    (1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
         
     | 
| 
      
 248 
     | 
    
         
            +
                    `call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
         
     | 
| 
      
 249 
     | 
    
         
            +
                    (4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
         
     | 
| 
      
 250 
     | 
    
         
            +
                    `call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
         
     | 
| 
      
 251 
     | 
    
         
            +
                    (1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
         
     | 
| 
      
 252 
     | 
    
         
            +
                    `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
         
     | 
| 
      
 253 
     | 
    
         
            +
                    `run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
         
     | 
| 
      
 254 
     | 
    
         
            +
                    `block in start_thread'</code></pre>\n    </div>\n</div>\n\n\n    <h2>\n
         
     | 
| 
      
 255 
     | 
    
         
            +
                    \     Routes\n    </h2>\n\n    <p>\n      Routes match in priority from top
         
     | 
| 
      
 256 
     | 
    
         
            +
                    to bottom\n    </p>\n\n    \n<table id='route_table' class='route_table'>\n
         
     | 
| 
      
 257 
     | 
    
         
            +
                    \ <thead>\n    <tr>\n      <th>Helper</th>\n      <th>HTTP Verb</th>\n      <th>Path</th>\n
         
     | 
| 
      
 258 
     | 
    
         
            +
                    \     <th>Controller#Action</th>\n    </tr>\n    <tr class='bottom'>\n      <th>\n
         
     | 
| 
      
 259 
     | 
    
         
            +
                    \       <a data-route-helper=\"_path\" href=\"#\" title=\"Returns a relative
         
     | 
| 
      
 260 
     | 
    
         
            +
                    path (without the http or domain)\">Path</a> /\n        <a data-route-helper=\"_url\"
         
     | 
| 
      
 261 
     | 
    
         
            +
                    href=\"#\" title=\"Returns an absolute url (with the http and domain)\">Url</a>\n
         
     | 
| 
      
 262 
     | 
    
         
            +
                    \     </th>\n      <th>\n      </th>\n      <th>\n        <input id=\"path_search\"
         
     | 
| 
      
 263 
     | 
    
         
            +
                    name=\"path[]\" placeholder=\"Path Match\" type=\"search\" />\n      </th>\n
         
     | 
| 
      
 264 
     | 
    
         
            +
                    \     <th>\n      </th>\n    </tr>\n  </thead>\n  <tbody class='matched_paths'
         
     | 
| 
      
 265 
     | 
    
         
            +
                    id='matched_paths'>\n  </tbody>\n  <tbody>\n    <tr class='route_row' data-helper='path'>\n
         
     | 
| 
      
 266 
     | 
    
         
            +
                    \ <td data-route-name='api_question_survey_questions'>\n      api_question_survey_questions<span
         
     | 
| 
      
 267 
     | 
    
         
            +
                    class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n    GET\n
         
     | 
| 
      
 268 
     | 
    
         
            +
                    \ </td>\n  <td data-route-path='/api/questions/:question_id/survey_questions(.:format)'
         
     | 
| 
      
 269 
     | 
    
         
            +
                    data-regexp='^\\/api\\/questions\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 270 
     | 
    
         
            +
                    \   /api/questions/:question_id/survey_questions(.:format)\n  </td>\n  <td
         
     | 
| 
      
 271 
     | 
    
         
            +
                    data-route-reqs='api/v1/survey_questions#index {:format=>"json"}'>\n
         
     | 
| 
      
 272 
     | 
    
         
            +
                    \   api/v1/survey_questions#index {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 273 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name='api_questions'>\n
         
     | 
| 
      
 274 
     | 
    
         
            +
                    \     api_questions<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 275 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/api/questions(.:format)' data-regexp='^\\/api\\/questions(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 276 
     | 
    
         
            +
                    \   /api/questions(.:format)\n  </td>\n  <td data-route-reqs='api/v1/questions#index
         
     | 
| 
      
 277 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/questions#index {:format=>"json"}\n
         
     | 
| 
      
 278 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='api_survey_survey_questions'>\n
         
     | 
| 
      
 279 
     | 
    
         
            +
                    \     api_survey_survey_questions<span class='helper'>_path</span>\n  </td>\n
         
     | 
| 
      
 280 
     | 
    
         
            +
                    \ <td data-route-verb='POST'>\n    POST\n  </td>\n  <td data-route-path='/api/surveys/:survey_id/survey_questions(.:format)'
         
     | 
| 
      
 281 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 282 
     | 
    
         
            +
                    \   /api/surveys/:survey_id/survey_questions(.:format)\n  </td>\n  <td data-route-reqs='api/v1/survey_questions#create
         
     | 
| 
      
 283 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/survey_questions#create {:format=>"json"}\n
         
     | 
| 
      
 284 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='api_survey_survey_question'>\n
         
     | 
| 
      
 285 
     | 
    
         
            +
                    \     api_survey_survey_question<span class='helper'>_path</span>\n  </td>\n
         
     | 
| 
      
 286 
     | 
    
         
            +
                    \ <td data-route-verb='GET'>\n    GET\n  </td>\n  <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
         
     | 
| 
      
 287 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 288 
     | 
    
         
            +
                    \   /api/surveys/:survey_id/survey_questions/:id(.:format)\n  </td>\n  <td
         
     | 
| 
      
 289 
     | 
    
         
            +
                    data-route-reqs='api/v1/survey_questions#show {:format=>"json"}'>\n
         
     | 
| 
      
 290 
     | 
    
         
            +
                    \   api/v1/survey_questions#show {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 291 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name=''>\n  </td>\n
         
     | 
| 
      
 292 
     | 
    
         
            +
                    \ <td data-route-verb='PATCH'>\n    PATCH\n  </td>\n  <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
         
     | 
| 
      
 293 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 294 
     | 
    
         
            +
                    \   /api/surveys/:survey_id/survey_questions/:id(.:format)\n  </td>\n  <td
         
     | 
| 
      
 295 
     | 
    
         
            +
                    data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
         
     | 
| 
      
 296 
     | 
    
         
            +
                    \   api/v1/survey_questions#update {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 297 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name=''>\n  </td>\n
         
     | 
| 
      
 298 
     | 
    
         
            +
                    \ <td data-route-verb='PUT'>\n    PUT\n  </td>\n  <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
         
     | 
| 
      
 299 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 300 
     | 
    
         
            +
                    \   /api/surveys/:survey_id/survey_questions/:id(.:format)\n  </td>\n  <td
         
     | 
| 
      
 301 
     | 
    
         
            +
                    data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
         
     | 
| 
      
 302 
     | 
    
         
            +
                    \   api/v1/survey_questions#update {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 303 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name='api_surveys'>\n
         
     | 
| 
      
 304 
     | 
    
         
            +
                    \     api_surveys<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 305 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/api/surveys(.:format)' data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 306 
     | 
    
         
            +
                    \   /api/surveys(.:format)\n  </td>\n  <td data-route-reqs='api/v1/surveys#index
         
     | 
| 
      
 307 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/surveys#index {:format=>"json"}\n
         
     | 
| 
      
 308 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name=''>\n
         
     | 
| 
      
 309 
     | 
    
         
            +
                    \ </td>\n  <td data-route-verb='POST'>\n    POST\n  </td>\n  <td data-route-path='/api/surveys(.:format)'
         
     | 
| 
      
 310 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n    /api/surveys(.:format)\n
         
     | 
| 
      
 311 
     | 
    
         
            +
                    \ </td>\n  <td data-route-reqs='api/v1/surveys#create {:format=>"json"}'>\n
         
     | 
| 
      
 312 
     | 
    
         
            +
                    \   api/v1/surveys#create {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 313 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name='api_survey'>\n
         
     | 
| 
      
 314 
     | 
    
         
            +
                    \     api_survey<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 315 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/api/surveys/:id(.:format)' data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 316 
     | 
    
         
            +
                    \   /api/surveys/:id(.:format)\n  </td>\n  <td data-route-reqs='api/v1/surveys#show
         
     | 
| 
      
 317 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/surveys#show {:format=>"json"}\n
         
     | 
| 
      
 318 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='api_users'>\n
         
     | 
| 
      
 319 
     | 
    
         
            +
                    \     api_users<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='POST'>\n
         
     | 
| 
      
 320 
     | 
    
         
            +
                    \   POST\n  </td>\n  <td data-route-path='/api/users(.:format)' data-regexp='^\\/api\\/users(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 321 
     | 
    
         
            +
                    \   /api/users(.:format)\n  </td>\n  <td data-route-reqs='api/v1/users#create
         
     | 
| 
      
 322 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/users#create {:format=>"json"}\n
         
     | 
| 
      
 323 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='api_user'>\n
         
     | 
| 
      
 324 
     | 
    
         
            +
                    \     api_user<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 325 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/api/users/:id(.:format)' data-regexp='^\\/api\\/users\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 326 
     | 
    
         
            +
                    \   /api/users/:id(.:format)\n  </td>\n  <td data-route-reqs='api/v1/users#show
         
     | 
| 
      
 327 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/users#show {:format=>"json"}\n
         
     | 
| 
      
 328 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='root'>\n
         
     | 
| 
      
 329 
     | 
    
         
            +
                    \     root<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 330 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/' data-regexp='^\\/$'>\n    /\n
         
     | 
| 
      
 331 
     | 
    
         
            +
                    \ </td>\n  <td data-route-reqs='api/v1/root#index'>\n    api/v1/root#index\n
         
     | 
| 
      
 332 
     | 
    
         
            +
                    \ </td>\n</tr>\n\n  </tbody>\n</table>\n\n<script type='text/javascript'>\n
         
     | 
| 
      
 333 
     | 
    
         
            +
                    \ function each(elems, func) {\n    if (!elems instanceof Array) { elems =
         
     | 
| 
      
 334 
     | 
    
         
            +
                    [elems]; }\n    for (var i = 0, len = elems.length; i < len; i++) {\n      func(elems[i]);\n
         
     | 
| 
      
 335 
     | 
    
         
            +
                    \   }\n  }\n\n  function setValOn(elems, val) {\n    each(elems, function(elem)
         
     | 
| 
      
 336 
     | 
    
         
            +
                    {\n      elem.innerHTML = val;\n    });\n  }\n\n  function onClick(elems,
         
     | 
| 
      
 337 
     | 
    
         
            +
                    func) {\n    each(elems, function(elem) {\n      elem.onclick = func;\n    });\n
         
     | 
| 
      
 338 
     | 
    
         
            +
                    \ }\n\n  // Enables functionality to toggle between `_path` and `_url` helper
         
     | 
| 
      
 339 
     | 
    
         
            +
                    suffixes\n  function setupRouteToggleHelperLinks() {\n    var toggleLinks
         
     | 
| 
      
 340 
     | 
    
         
            +
                    = document.querySelectorAll('#route_table [data-route-helper]');\n    onClick(toggleLinks,
         
     | 
| 
      
 341 
     | 
    
         
            +
                    function(){\n      var helperTxt   = this.getAttribute(\"data-route-helper\"),\n
         
     | 
| 
      
 342 
     | 
    
         
            +
                    \         helperElems = document.querySelectorAll('[data-route-name] span.helper');\n
         
     | 
| 
      
 343 
     | 
    
         
            +
                    \     setValOn(helperElems, helperTxt);\n    });\n  }\n\n  // takes an array
         
     | 
| 
      
 344 
     | 
    
         
            +
                    of elements with a data-regexp attribute and\n  // passes their their parent
         
     | 
| 
      
 345 
     | 
    
         
            +
                    <tr> into the callback function\n  // if the regexp matchs a given path\n
         
     | 
| 
      
 346 
     | 
    
         
            +
                    \ function eachElemsForPath(elems, path, func) {\n    each(elems, function(e){\n
         
     | 
| 
      
 347 
     | 
    
         
            +
                    \     var reg = e.getAttribute(\"data-regexp\");\n      if (path.match(RegExp(reg)))
         
     | 
| 
      
 348 
     | 
    
         
            +
                    {\n        func(e.parentNode.cloneNode(true));\n      }\n    })\n  }\n\n  //
         
     | 
| 
      
 349 
     | 
    
         
            +
                    Ensure path always starts with a slash \"/\" and remove params or fragments\n
         
     | 
| 
      
 350 
     | 
    
         
            +
                    \ function sanitizePath(path) {\n    var path = path.charAt(0) == '/' ? path
         
     | 
| 
      
 351 
     | 
    
         
            +
                    : \"/\" + path;\n    return path.replace(/\\#.*|\\?.*/, '');\n  }\n\n  //
         
     | 
| 
      
 352 
     | 
    
         
            +
                    Enables path search functionality\n  function setupMatchPaths() {\n    var
         
     | 
| 
      
 353 
     | 
    
         
            +
                    regexpElems     = document.querySelectorAll('#route_table [data-regexp]'),\n
         
     | 
| 
      
 354 
     | 
    
         
            +
                    \       pathElem        = document.querySelector('#path_search'),\n        selectedSection
         
     | 
| 
      
 355 
     | 
    
         
            +
                    = document.querySelector('#matched_paths'),\n        noMatchText     = '<tr><th
         
     | 
| 
      
 356 
     | 
    
         
            +
                    colspan=\"4\">None</th></tr>';\n\n\n    // Remove matches if no path is present\n
         
     | 
| 
      
 357 
     | 
    
         
            +
                    \   pathElem.onblur = function(e) {\n      if (pathElem.value === \"\") selectedSection.innerHTML
         
     | 
| 
      
 358 
     | 
    
         
            +
                    = \"\";\n    }\n\n    // On key press perform a search for matching paths\n
         
     | 
| 
      
 359 
     | 
    
         
            +
                    \   pathElem.onkeyup = function(e){\n      var path        = sanitizePath(pathElem.value),\n
         
     | 
| 
      
 360 
     | 
    
         
            +
                    \         defaultText = '<tr><th colspan=\"4\">Paths Matching (' + path +
         
     | 
| 
      
 361 
     | 
    
         
            +
                    '):</th></tr>';\n\n      // Clear out results section\n      selectedSection.innerHTML=
         
     | 
| 
      
 362 
     | 
    
         
            +
                    defaultText;\n\n      // Display matches if they exist\n      eachElemsForPath(regexpElems,
         
     | 
| 
      
 363 
     | 
    
         
            +
                    path, function(e){\n        selectedSection.appendChild(e);\n      });\n\n
         
     | 
| 
      
 364 
     | 
    
         
            +
                    \     // If no match present, tell the user\n      if (selectedSection.innerHTML
         
     | 
| 
      
 365 
     | 
    
         
            +
                    === defaultText) {\n        selectedSection.innerHTML = selectedSection.innerHTML
         
     | 
| 
      
 366 
     | 
    
         
            +
                    + noMatchText;\n      }\n    }\n  }\n\n  setupMatchPaths();\n  setupRouteToggleHelperLinks();\n</script>\n\n</div>\n\n\n</body>\n</html>\n"
         
     | 
| 
      
 367 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 368 
     | 
    
         
            +
              recorded_at: Sat, 13 Sep 2014 15:26:48 GMT
         
     | 
| 
      
 369 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 370 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 371 
     | 
    
         
            +
                uri: http://localhost:3000/api/%2Fusers/
         
     | 
| 
      
 372 
     | 
    
         
            +
                body:
         
     | 
| 
      
 373 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 374 
     | 
    
         
            +
                  string: '{"user":{"external_user_id":42}}'
         
     | 
| 
      
 375 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 376 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 377 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 378 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 379 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 380 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 381 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 382 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 383 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 384 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 385 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 386 
     | 
    
         
            +
              response:
         
     | 
| 
      
 387 
     | 
    
         
            +
                status:
         
     | 
| 
      
 388 
     | 
    
         
            +
                  code: 404
         
     | 
| 
      
 389 
     | 
    
         
            +
                  message: 'Not Found '
         
     | 
| 
      
 390 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 391 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 392 
     | 
    
         
            +
                  - text/html; charset=utf-8
         
     | 
| 
      
 393 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 394 
     | 
    
         
            +
                  - '16582'
         
     | 
| 
      
 395 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 396 
     | 
    
         
            +
                  - f2f6e0fb-452c-40ac-84b0-35382fa1cee8
         
     | 
| 
      
 397 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 398 
     | 
    
         
            +
                  - '0.017903'
         
     | 
| 
      
 399 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 400 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 401 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 402 
     | 
    
         
            +
                  - Sat, 13 Sep 2014 15:31:11 GMT
         
     | 
| 
      
 403 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 404 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 405 
     | 
    
         
            +
                body:
         
     | 
| 
      
 406 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 407 
     | 
    
         
            +
                  string: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\"
         
     | 
| 
      
 408 
     | 
    
         
            +
                    />\n  <title>Action Controller: Exception caught</title>\n  <style>\n    body
         
     | 
| 
      
 409 
     | 
    
         
            +
                    {\n      background-color: #FAFAFA;\n      color: #333;\n      margin: 0px;\n
         
     | 
| 
      
 410 
     | 
    
         
            +
                    \   }\n\n    body, p, ol, ul, td {\n      font-family: helvetica, verdana,
         
     | 
| 
      
 411 
     | 
    
         
            +
                    arial, sans-serif;\n      font-size:   13px;\n      line-height: 18px;\n    }\n\n
         
     | 
| 
      
 412 
     | 
    
         
            +
                    \   pre {\n      font-size: 11px;\n      white-space: pre-wrap;\n    }\n\n
         
     | 
| 
      
 413 
     | 
    
         
            +
                    \   pre.box {\n      border: 1px solid #EEE;\n      padding: 10px;\n      margin:
         
     | 
| 
      
 414 
     | 
    
         
            +
                    0px;\n      width: 958px;\n    }\n\n    header {\n      color: #F0F0F0;\n
         
     | 
| 
      
 415 
     | 
    
         
            +
                    \     background: #C52F24;\n      padding: 0.5em 1.5em;\n    }\n\n    h1 {\n
         
     | 
| 
      
 416 
     | 
    
         
            +
                    \     margin: 0.2em 0;\n      line-height: 1.1em;\n      font-size: 2em;\n
         
     | 
| 
      
 417 
     | 
    
         
            +
                    \   }\n\n    h2 {\n      color: #C52F24;\n      line-height: 25px;\n    }\n\n
         
     | 
| 
      
 418 
     | 
    
         
            +
                    \   .details {\n      border: 1px solid #D0D0D0;\n      border-radius: 4px;\n
         
     | 
| 
      
 419 
     | 
    
         
            +
                    \     margin: 1em 0px;\n      display: block;\n      width: 978px;\n    }\n\n
         
     | 
| 
      
 420 
     | 
    
         
            +
                    \   .summary {\n      padding: 8px 15px;\n      border-bottom: 1px solid #D0D0D0;\n
         
     | 
| 
      
 421 
     | 
    
         
            +
                    \     display: block;\n    }\n\n    .details pre {\n      margin: 5px;\n      border:
         
     | 
| 
      
 422 
     | 
    
         
            +
                    none;\n    }\n\n    #container {\n      box-sizing: border-box;\n      width:
         
     | 
| 
      
 423 
     | 
    
         
            +
                    100%;\n      padding: 0 1.5em;\n    }\n\n    .source * {\n      margin: 0px;\n
         
     | 
| 
      
 424 
     | 
    
         
            +
                    \     padding: 0px;\n    }\n\n    .source {\n      border: 1px solid #D9D9D9;\n
         
     | 
| 
      
 425 
     | 
    
         
            +
                    \     background: #ECECEC;\n      width: 978px;\n    }\n\n    .source pre
         
     | 
| 
      
 426 
     | 
    
         
            +
                    {\n      padding: 10px 0px;\n      border: none;\n    }\n\n    .source .data
         
     | 
| 
      
 427 
     | 
    
         
            +
                    {\n      font-size: 80%;\n      overflow: auto;\n      background-color: #FFF;\n
         
     | 
| 
      
 428 
     | 
    
         
            +
                    \   }\n\n    .info {\n      padding: 0.5em;\n    }\n\n    .source .data .line_numbers
         
     | 
| 
      
 429 
     | 
    
         
            +
                    {\n      background-color: #ECECEC;\n      color: #AAA;\n      padding: 1em
         
     | 
| 
      
 430 
     | 
    
         
            +
                    .5em;\n      border-right: 1px solid #DDD;\n      text-align: right;\n    }\n\n
         
     | 
| 
      
 431 
     | 
    
         
            +
                    \   .line {\n      padding-left: 10px;\n    }\n\n    .line:hover {\n      background-color:
         
     | 
| 
      
 432 
     | 
    
         
            +
                    #F6F6F6;\n    }\n\n    .line.active {\n      background-color: #FFCCCC;\n
         
     | 
| 
      
 433 
     | 
    
         
            +
                    \   }\n\n    a { color: #980905; }\n    a:visited { color: #666; }\n    a:hover
         
     | 
| 
      
 434 
     | 
    
         
            +
                    { color: #C52F24; }\n\n      #route_table {\n    margin: 0 auto 0;\n    border-collapse:
         
     | 
| 
      
 435 
     | 
    
         
            +
                    collapse;\n  }\n\n  #route_table td {\n    padding: 0 30px;\n  }\n\n  #route_table
         
     | 
| 
      
 436 
     | 
    
         
            +
                    tr.bottom th {\n    padding-bottom: 10px;\n    line-height: 15px;\n  }\n\n
         
     | 
| 
      
 437 
     | 
    
         
            +
                    \ #route_table .matched_paths {\n    background-color: LightGoldenRodYellow;\n
         
     | 
| 
      
 438 
     | 
    
         
            +
                    \ }\n\n  #route_table .matched_paths {\n    border-bottom: solid 3px SlateGrey;\n
         
     | 
| 
      
 439 
     | 
    
         
            +
                    \ }\n\n  #path_search {\n    width: 80%;\n    font-size: inherit;\n  }\n\n
         
     | 
| 
      
 440 
     | 
    
         
            +
                    \ </style>\n\n  <script>\n    var toggle = function(id) {\n      var s = document.getElementById(id).style;\n
         
     | 
| 
      
 441 
     | 
    
         
            +
                    \     s.display = s.display == 'none' ? 'block' : 'none';\n      return false;\n
         
     | 
| 
      
 442 
     | 
    
         
            +
                    \   }\n    var show = function(id) {\n      document.getElementById(id).style.display
         
     | 
| 
      
 443 
     | 
    
         
            +
                    = 'block';\n    }\n    var hide = function(id) {\n      document.getElementById(id).style.display
         
     | 
| 
      
 444 
     | 
    
         
            +
                    = 'none';\n    }\n    var toggleTrace = function() {\n      return toggle('blame_trace');\n
         
     | 
| 
      
 445 
     | 
    
         
            +
                    \   }\n    var toggleSessionDump = function() {\n      return toggle('session_dump');\n
         
     | 
| 
      
 446 
     | 
    
         
            +
                    \   }\n    var toggleEnvDump = function() {\n      return toggle('env_dump');\n
         
     | 
| 
      
 447 
     | 
    
         
            +
                    \   }\n  </script>\n</head>\n<body>\n\n<header>\n  <h1>Routing Error</h1>\n</header>\n<div
         
     | 
| 
      
 448 
     | 
    
         
            +
                    id=\"container\">\n  <h2>No route matches [POST] "/api/%2Fusers"</h2>\n\n
         
     | 
| 
      
 449 
     | 
    
         
            +
                    \ \n<p><code>Rails.root: /Users/austenito/repos/happiness/happiness_service</code></p>\n\n<div
         
     | 
| 
      
 450 
     | 
    
         
            +
                    id=\"traces\">\n    <a href=\"#\" onclick=\"hide('Framework-Trace');hide('Full-Trace');show('Application-Trace');;
         
     | 
| 
      
 451 
     | 
    
         
            +
                    return false;\">Application Trace</a> |\n    <a href=\"#\" onclick=\"hide('Application-Trace');hide('Full-Trace');show('Framework-Trace');;
         
     | 
| 
      
 452 
     | 
    
         
            +
                    return false;\">Framework Trace</a> |\n    <a href=\"#\" onclick=\"hide('Application-Trace');hide('Framework-Trace');show('Full-Trace');;
         
     | 
| 
      
 453 
     | 
    
         
            +
                    return false;\">Full Trace</a> \n\n    <div id=\"Application-Trace\" style=\"display:
         
     | 
| 
      
 454 
     | 
    
         
            +
                    block;\">\n      <pre><code></code></pre>\n    </div>\n    <div id=\"Framework-Trace\"
         
     | 
| 
      
 455 
     | 
    
         
            +
                    style=\"display: none;\">\n      <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
         
     | 
| 
      
 456 
     | 
    
         
            +
                    `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
         
     | 
| 
      
 457 
     | 
    
         
            +
                    `call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
         
     | 
| 
      
 458 
     | 
    
         
            +
                    (4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
         
     | 
| 
      
 459 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
         
     | 
| 
      
 460 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
         
     | 
| 
      
 461 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
         
     | 
| 
      
 462 
     | 
    
         
            +
                    (4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
         
     | 
| 
      
 463 
     | 
    
         
            +
                    `call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
         
     | 
| 
      
 464 
     | 
    
         
            +
                    (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
         
     | 
| 
      
 465 
     | 
    
         
            +
                    (1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
         
     | 
| 
      
 466 
     | 
    
         
            +
                    `call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
         
     | 
| 
      
 467 
     | 
    
         
            +
                    (4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
         
     | 
| 
      
 468 
     | 
    
         
            +
                    `call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
         
     | 
| 
      
 469 
     | 
    
         
            +
                    (1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
         
     | 
| 
      
 470 
     | 
    
         
            +
                    `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
         
     | 
| 
      
 471 
     | 
    
         
            +
                    `run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
         
     | 
| 
      
 472 
     | 
    
         
            +
                    `block in start_thread'</code></pre>\n    </div>\n    <div id=\"Full-Trace\"
         
     | 
| 
      
 473 
     | 
    
         
            +
                    style=\"display: none;\">\n      <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
         
     | 
| 
      
 474 
     | 
    
         
            +
                    `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
         
     | 
| 
      
 475 
     | 
    
         
            +
                    `call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
         
     | 
| 
      
 476 
     | 
    
         
            +
                    (4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
         
     | 
| 
      
 477 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
         
     | 
| 
      
 478 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
         
     | 
| 
      
 479 
     | 
    
         
            +
                    (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
         
     | 
| 
      
 480 
     | 
    
         
            +
                    (4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
         
     | 
| 
      
 481 
     | 
    
         
            +
                    `call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
         
     | 
| 
      
 482 
     | 
    
         
            +
                    (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
         
     | 
| 
      
 483 
     | 
    
         
            +
                    (1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
         
     | 
| 
      
 484 
     | 
    
         
            +
                    `call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
         
     | 
| 
      
 485 
     | 
    
         
            +
                    (4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
         
     | 
| 
      
 486 
     | 
    
         
            +
                    `call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
         
     | 
| 
      
 487 
     | 
    
         
            +
                    (1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
         
     | 
| 
      
 488 
     | 
    
         
            +
                    `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
         
     | 
| 
      
 489 
     | 
    
         
            +
                    `run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
         
     | 
| 
      
 490 
     | 
    
         
            +
                    `block in start_thread'</code></pre>\n    </div>\n</div>\n\n\n    <h2>\n
         
     | 
| 
      
 491 
     | 
    
         
            +
                    \     Routes\n    </h2>\n\n    <p>\n      Routes match in priority from top
         
     | 
| 
      
 492 
     | 
    
         
            +
                    to bottom\n    </p>\n\n    \n<table id='route_table' class='route_table'>\n
         
     | 
| 
      
 493 
     | 
    
         
            +
                    \ <thead>\n    <tr>\n      <th>Helper</th>\n      <th>HTTP Verb</th>\n      <th>Path</th>\n
         
     | 
| 
      
 494 
     | 
    
         
            +
                    \     <th>Controller#Action</th>\n    </tr>\n    <tr class='bottom'>\n      <th>\n
         
     | 
| 
      
 495 
     | 
    
         
            +
                    \       <a data-route-helper=\"_path\" href=\"#\" title=\"Returns a relative
         
     | 
| 
      
 496 
     | 
    
         
            +
                    path (without the http or domain)\">Path</a> /\n        <a data-route-helper=\"_url\"
         
     | 
| 
      
 497 
     | 
    
         
            +
                    href=\"#\" title=\"Returns an absolute url (with the http and domain)\">Url</a>\n
         
     | 
| 
      
 498 
     | 
    
         
            +
                    \     </th>\n      <th>\n      </th>\n      <th>\n        <input id=\"path_search\"
         
     | 
| 
      
 499 
     | 
    
         
            +
                    name=\"path[]\" placeholder=\"Path Match\" type=\"search\" />\n      </th>\n
         
     | 
| 
      
 500 
     | 
    
         
            +
                    \     <th>\n      </th>\n    </tr>\n  </thead>\n  <tbody class='matched_paths'
         
     | 
| 
      
 501 
     | 
    
         
            +
                    id='matched_paths'>\n  </tbody>\n  <tbody>\n    <tr class='route_row' data-helper='path'>\n
         
     | 
| 
      
 502 
     | 
    
         
            +
                    \ <td data-route-name='api_question_survey_questions'>\n      api_question_survey_questions<span
         
     | 
| 
      
 503 
     | 
    
         
            +
                    class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n    GET\n
         
     | 
| 
      
 504 
     | 
    
         
            +
                    \ </td>\n  <td data-route-path='/api/questions/:question_id/survey_questions(.:format)'
         
     | 
| 
      
 505 
     | 
    
         
            +
                    data-regexp='^\\/api\\/questions\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 506 
     | 
    
         
            +
                    \   /api/questions/:question_id/survey_questions(.:format)\n  </td>\n  <td
         
     | 
| 
      
 507 
     | 
    
         
            +
                    data-route-reqs='api/v1/survey_questions#index {:format=>"json"}'>\n
         
     | 
| 
      
 508 
     | 
    
         
            +
                    \   api/v1/survey_questions#index {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 509 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name='api_questions'>\n
         
     | 
| 
      
 510 
     | 
    
         
            +
                    \     api_questions<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 511 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/api/questions(.:format)' data-regexp='^\\/api\\/questions(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 512 
     | 
    
         
            +
                    \   /api/questions(.:format)\n  </td>\n  <td data-route-reqs='api/v1/questions#index
         
     | 
| 
      
 513 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/questions#index {:format=>"json"}\n
         
     | 
| 
      
 514 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='api_survey_survey_questions'>\n
         
     | 
| 
      
 515 
     | 
    
         
            +
                    \     api_survey_survey_questions<span class='helper'>_path</span>\n  </td>\n
         
     | 
| 
      
 516 
     | 
    
         
            +
                    \ <td data-route-verb='POST'>\n    POST\n  </td>\n  <td data-route-path='/api/surveys/:survey_id/survey_questions(.:format)'
         
     | 
| 
      
 517 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 518 
     | 
    
         
            +
                    \   /api/surveys/:survey_id/survey_questions(.:format)\n  </td>\n  <td data-route-reqs='api/v1/survey_questions#create
         
     | 
| 
      
 519 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/survey_questions#create {:format=>"json"}\n
         
     | 
| 
      
 520 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='api_survey_survey_question'>\n
         
     | 
| 
      
 521 
     | 
    
         
            +
                    \     api_survey_survey_question<span class='helper'>_path</span>\n  </td>\n
         
     | 
| 
      
 522 
     | 
    
         
            +
                    \ <td data-route-verb='GET'>\n    GET\n  </td>\n  <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
         
     | 
| 
      
 523 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 524 
     | 
    
         
            +
                    \   /api/surveys/:survey_id/survey_questions/:id(.:format)\n  </td>\n  <td
         
     | 
| 
      
 525 
     | 
    
         
            +
                    data-route-reqs='api/v1/survey_questions#show {:format=>"json"}'>\n
         
     | 
| 
      
 526 
     | 
    
         
            +
                    \   api/v1/survey_questions#show {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 527 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name=''>\n  </td>\n
         
     | 
| 
      
 528 
     | 
    
         
            +
                    \ <td data-route-verb='PATCH'>\n    PATCH\n  </td>\n  <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
         
     | 
| 
      
 529 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 530 
     | 
    
         
            +
                    \   /api/surveys/:survey_id/survey_questions/:id(.:format)\n  </td>\n  <td
         
     | 
| 
      
 531 
     | 
    
         
            +
                    data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
         
     | 
| 
      
 532 
     | 
    
         
            +
                    \   api/v1/survey_questions#update {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 533 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name=''>\n  </td>\n
         
     | 
| 
      
 534 
     | 
    
         
            +
                    \ <td data-route-verb='PUT'>\n    PUT\n  </td>\n  <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
         
     | 
| 
      
 535 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 536 
     | 
    
         
            +
                    \   /api/surveys/:survey_id/survey_questions/:id(.:format)\n  </td>\n  <td
         
     | 
| 
      
 537 
     | 
    
         
            +
                    data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
         
     | 
| 
      
 538 
     | 
    
         
            +
                    \   api/v1/survey_questions#update {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 539 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name='api_surveys'>\n
         
     | 
| 
      
 540 
     | 
    
         
            +
                    \     api_surveys<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 541 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/api/surveys(.:format)' data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 542 
     | 
    
         
            +
                    \   /api/surveys(.:format)\n  </td>\n  <td data-route-reqs='api/v1/surveys#index
         
     | 
| 
      
 543 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/surveys#index {:format=>"json"}\n
         
     | 
| 
      
 544 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name=''>\n
         
     | 
| 
      
 545 
     | 
    
         
            +
                    \ </td>\n  <td data-route-verb='POST'>\n    POST\n  </td>\n  <td data-route-path='/api/surveys(.:format)'
         
     | 
| 
      
 546 
     | 
    
         
            +
                    data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n    /api/surveys(.:format)\n
         
     | 
| 
      
 547 
     | 
    
         
            +
                    \ </td>\n  <td data-route-reqs='api/v1/surveys#create {:format=>"json"}'>\n
         
     | 
| 
      
 548 
     | 
    
         
            +
                    \   api/v1/surveys#create {:format=>"json"}\n  </td>\n</tr>\n<tr
         
     | 
| 
      
 549 
     | 
    
         
            +
                    class='route_row' data-helper='path'>\n  <td data-route-name='api_survey'>\n
         
     | 
| 
      
 550 
     | 
    
         
            +
                    \     api_survey<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 551 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/api/surveys/:id(.:format)' data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 552 
     | 
    
         
            +
                    \   /api/surveys/:id(.:format)\n  </td>\n  <td data-route-reqs='api/v1/surveys#show
         
     | 
| 
      
 553 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/surveys#show {:format=>"json"}\n
         
     | 
| 
      
 554 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='api_users'>\n
         
     | 
| 
      
 555 
     | 
    
         
            +
                    \     api_users<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='POST'>\n
         
     | 
| 
      
 556 
     | 
    
         
            +
                    \   POST\n  </td>\n  <td data-route-path='/api/users(.:format)' data-regexp='^\\/api\\/users(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 557 
     | 
    
         
            +
                    \   /api/users(.:format)\n  </td>\n  <td data-route-reqs='api/v1/users#create
         
     | 
| 
      
 558 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/users#create {:format=>"json"}\n
         
     | 
| 
      
 559 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='api_user'>\n
         
     | 
| 
      
 560 
     | 
    
         
            +
                    \     api_user<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 561 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/api/users/:id(.:format)' data-regexp='^\\/api\\/users\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
         
     | 
| 
      
 562 
     | 
    
         
            +
                    \   /api/users/:id(.:format)\n  </td>\n  <td data-route-reqs='api/v1/users#show
         
     | 
| 
      
 563 
     | 
    
         
            +
                    {:format=>"json"}'>\n    api/v1/users#show {:format=>"json"}\n
         
     | 
| 
      
 564 
     | 
    
         
            +
                    \ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n  <td data-route-name='root'>\n
         
     | 
| 
      
 565 
     | 
    
         
            +
                    \     root<span class='helper'>_path</span>\n  </td>\n  <td data-route-verb='GET'>\n
         
     | 
| 
      
 566 
     | 
    
         
            +
                    \   GET\n  </td>\n  <td data-route-path='/' data-regexp='^\\/$'>\n    /\n
         
     | 
| 
      
 567 
     | 
    
         
            +
                    \ </td>\n  <td data-route-reqs='api/v1/root#index'>\n    api/v1/root#index\n
         
     | 
| 
      
 568 
     | 
    
         
            +
                    \ </td>\n</tr>\n\n  </tbody>\n</table>\n\n<script type='text/javascript'>\n
         
     | 
| 
      
 569 
     | 
    
         
            +
                    \ function each(elems, func) {\n    if (!elems instanceof Array) { elems =
         
     | 
| 
      
 570 
     | 
    
         
            +
                    [elems]; }\n    for (var i = 0, len = elems.length; i < len; i++) {\n      func(elems[i]);\n
         
     | 
| 
      
 571 
     | 
    
         
            +
                    \   }\n  }\n\n  function setValOn(elems, val) {\n    each(elems, function(elem)
         
     | 
| 
      
 572 
     | 
    
         
            +
                    {\n      elem.innerHTML = val;\n    });\n  }\n\n  function onClick(elems,
         
     | 
| 
      
 573 
     | 
    
         
            +
                    func) {\n    each(elems, function(elem) {\n      elem.onclick = func;\n    });\n
         
     | 
| 
      
 574 
     | 
    
         
            +
                    \ }\n\n  // Enables functionality to toggle between `_path` and `_url` helper
         
     | 
| 
      
 575 
     | 
    
         
            +
                    suffixes\n  function setupRouteToggleHelperLinks() {\n    var toggleLinks
         
     | 
| 
      
 576 
     | 
    
         
            +
                    = document.querySelectorAll('#route_table [data-route-helper]');\n    onClick(toggleLinks,
         
     | 
| 
      
 577 
     | 
    
         
            +
                    function(){\n      var helperTxt   = this.getAttribute(\"data-route-helper\"),\n
         
     | 
| 
      
 578 
     | 
    
         
            +
                    \         helperElems = document.querySelectorAll('[data-route-name] span.helper');\n
         
     | 
| 
      
 579 
     | 
    
         
            +
                    \     setValOn(helperElems, helperTxt);\n    });\n  }\n\n  // takes an array
         
     | 
| 
      
 580 
     | 
    
         
            +
                    of elements with a data-regexp attribute and\n  // passes their their parent
         
     | 
| 
      
 581 
     | 
    
         
            +
                    <tr> into the callback function\n  // if the regexp matchs a given path\n
         
     | 
| 
      
 582 
     | 
    
         
            +
                    \ function eachElemsForPath(elems, path, func) {\n    each(elems, function(e){\n
         
     | 
| 
      
 583 
     | 
    
         
            +
                    \     var reg = e.getAttribute(\"data-regexp\");\n      if (path.match(RegExp(reg)))
         
     | 
| 
      
 584 
     | 
    
         
            +
                    {\n        func(e.parentNode.cloneNode(true));\n      }\n    })\n  }\n\n  //
         
     | 
| 
      
 585 
     | 
    
         
            +
                    Ensure path always starts with a slash \"/\" and remove params or fragments\n
         
     | 
| 
      
 586 
     | 
    
         
            +
                    \ function sanitizePath(path) {\n    var path = path.charAt(0) == '/' ? path
         
     | 
| 
      
 587 
     | 
    
         
            +
                    : \"/\" + path;\n    return path.replace(/\\#.*|\\?.*/, '');\n  }\n\n  //
         
     | 
| 
      
 588 
     | 
    
         
            +
                    Enables path search functionality\n  function setupMatchPaths() {\n    var
         
     | 
| 
      
 589 
     | 
    
         
            +
                    regexpElems     = document.querySelectorAll('#route_table [data-regexp]'),\n
         
     | 
| 
      
 590 
     | 
    
         
            +
                    \       pathElem        = document.querySelector('#path_search'),\n        selectedSection
         
     | 
| 
      
 591 
     | 
    
         
            +
                    = document.querySelector('#matched_paths'),\n        noMatchText     = '<tr><th
         
     | 
| 
      
 592 
     | 
    
         
            +
                    colspan=\"4\">None</th></tr>';\n\n\n    // Remove matches if no path is present\n
         
     | 
| 
      
 593 
     | 
    
         
            +
                    \   pathElem.onblur = function(e) {\n      if (pathElem.value === \"\") selectedSection.innerHTML
         
     | 
| 
      
 594 
     | 
    
         
            +
                    = \"\";\n    }\n\n    // On key press perform a search for matching paths\n
         
     | 
| 
      
 595 
     | 
    
         
            +
                    \   pathElem.onkeyup = function(e){\n      var path        = sanitizePath(pathElem.value),\n
         
     | 
| 
      
 596 
     | 
    
         
            +
                    \         defaultText = '<tr><th colspan=\"4\">Paths Matching (' + path +
         
     | 
| 
      
 597 
     | 
    
         
            +
                    '):</th></tr>';\n\n      // Clear out results section\n      selectedSection.innerHTML=
         
     | 
| 
      
 598 
     | 
    
         
            +
                    defaultText;\n\n      // Display matches if they exist\n      eachElemsForPath(regexpElems,
         
     | 
| 
      
 599 
     | 
    
         
            +
                    path, function(e){\n        selectedSection.appendChild(e);\n      });\n\n
         
     | 
| 
      
 600 
     | 
    
         
            +
                    \     // If no match present, tell the user\n      if (selectedSection.innerHTML
         
     | 
| 
      
 601 
     | 
    
         
            +
                    === defaultText) {\n        selectedSection.innerHTML = selectedSection.innerHTML
         
     | 
| 
      
 602 
     | 
    
         
            +
                    + noMatchText;\n      }\n    }\n  }\n\n  setupMatchPaths();\n  setupRouteToggleHelperLinks();\n</script>\n\n</div>\n\n\n</body>\n</html>\n"
         
     | 
| 
      
 603 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 604 
     | 
    
         
            +
              recorded_at: Sat, 13 Sep 2014 15:31:11 GMT
         
     | 
| 
      
 605 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 606 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 607 
     | 
    
         
            +
                uri: http://localhost:3000/
         
     | 
| 
      
 608 
     | 
    
         
            +
                body:
         
     | 
| 
      
 609 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 610 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 611 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 612 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 613 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 614 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 615 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 616 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 617 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 618 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 619 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 620 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 621 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 622 
     | 
    
         
            +
              response:
         
     | 
| 
      
 623 
     | 
    
         
            +
                status:
         
     | 
| 
      
 624 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 625 
     | 
    
         
            +
                  message: 'OK '
         
     | 
| 
      
 626 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 627 
     | 
    
         
            +
                  X-Frame-Options:
         
     | 
| 
      
 628 
     | 
    
         
            +
                  - SAMEORIGIN
         
     | 
| 
      
 629 
     | 
    
         
            +
                  X-Xss-Protection:
         
     | 
| 
      
 630 
     | 
    
         
            +
                  - 1; mode=block
         
     | 
| 
      
 631 
     | 
    
         
            +
                  X-Content-Type-Options:
         
     | 
| 
      
 632 
     | 
    
         
            +
                  - nosniff
         
     | 
| 
      
 633 
     | 
    
         
            +
                  X-Ua-Compatible:
         
     | 
| 
      
 634 
     | 
    
         
            +
                  - chrome=1
         
     | 
| 
      
 635 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 636 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 637 
     | 
    
         
            +
                  Etag:
         
     | 
| 
      
 638 
     | 
    
         
            +
                  - '"c4942090acbc96722cba50e4cecfde73"'
         
     | 
| 
      
 639 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 640 
     | 
    
         
            +
                  - max-age=0, private, must-revalidate
         
     | 
| 
      
 641 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 642 
     | 
    
         
            +
                  - fe9577d9-1fb2-4c5c-a8f2-fb77c39fed0c
         
     | 
| 
      
 643 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 644 
     | 
    
         
            +
                  - '0.003953'
         
     | 
| 
      
 645 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 646 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 647 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 648 
     | 
    
         
            +
                  - Sat, 20 Sep 2014 14:14:33 GMT
         
     | 
| 
      
 649 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 650 
     | 
    
         
            +
                  - '236'
         
     | 
| 
       118 
651 
     | 
    
         
             
                  Connection:
         
     | 
| 
       119 
652 
     | 
    
         
             
                  - Keep-Alive
         
     | 
| 
       120 
653 
     | 
    
         
             
                body:
         
     | 
| 
       121 
654 
     | 
    
         
             
                  encoding: UTF-8
         
     | 
| 
       122 
655 
     | 
    
         
             
                  string: |-
         
     | 
| 
       123 
656 
     | 
    
         
             
                    {
         
     | 
| 
       124 
     | 
    
         
            -
                      "id": 321,
         
     | 
| 
       125 
     | 
    
         
            -
                      "external_user_id": 42,
         
     | 
| 
       126 
657 
     | 
    
         
             
                      "_links": {
         
     | 
| 
       127 
658 
     | 
    
         
             
                        "self": {
         
     | 
| 
       128 
     | 
    
         
            -
                          "href": "http://localhost:3000/ 
     | 
| 
      
 659 
     | 
    
         
            +
                          "href": "http://localhost:3000/"
         
     | 
| 
      
 660 
     | 
    
         
            +
                        },
         
     | 
| 
      
 661 
     | 
    
         
            +
                        "surveys": {
         
     | 
| 
      
 662 
     | 
    
         
            +
                          "href": "api/surveys"
         
     | 
| 
      
 663 
     | 
    
         
            +
                        },
         
     | 
| 
      
 664 
     | 
    
         
            +
                        "users": {
         
     | 
| 
      
 665 
     | 
    
         
            +
                          "href": "api/users"
         
     | 
| 
      
 666 
     | 
    
         
            +
                        },
         
     | 
| 
      
 667 
     | 
    
         
            +
                        "questions": {
         
     | 
| 
      
 668 
     | 
    
         
            +
                          "href": "api/questions"
         
     | 
| 
       129 
669 
     | 
    
         
             
                        }
         
     | 
| 
       130 
670 
     | 
    
         
             
                      }
         
     | 
| 
       131 
671 
     | 
    
         
             
                    }
         
     | 
| 
       132 
672 
     | 
    
         
             
                http_version: 
         
     | 
| 
       133 
     | 
    
         
            -
              recorded_at: Sat,  
     | 
| 
      
 673 
     | 
    
         
            +
              recorded_at: Sat, 20 Sep 2014 14:14:33 GMT
         
     | 
| 
       134 
674 
     | 
    
         
             
            - request:
         
     | 
| 
       135 
675 
     | 
    
         
             
                method: get
         
     | 
| 
       136 
676 
     | 
    
         
             
                uri: http://localhost:3000/
         
     | 
| 
         @@ -164,19 +704,19 @@ http_interactions: 
     | 
|
| 
       164 
704 
     | 
    
         
             
                  Content-Type:
         
     | 
| 
       165 
705 
     | 
    
         
             
                  - application/json; charset=utf-8
         
     | 
| 
       166 
706 
     | 
    
         
             
                  Etag:
         
     | 
| 
       167 
     | 
    
         
            -
                  - '" 
     | 
| 
      
 707 
     | 
    
         
            +
                  - '"c4942090acbc96722cba50e4cecfde73"'
         
     | 
| 
       168 
708 
     | 
    
         
             
                  Cache-Control:
         
     | 
| 
       169 
709 
     | 
    
         
             
                  - max-age=0, private, must-revalidate
         
     | 
| 
       170 
710 
     | 
    
         
             
                  X-Request-Id:
         
     | 
| 
       171 
     | 
    
         
            -
                  -  
     | 
| 
      
 711 
     | 
    
         
            +
                  - c03c3576-0c72-4534-b6cf-6b2cf597a4d6
         
     | 
| 
       172 
712 
     | 
    
         
             
                  X-Runtime:
         
     | 
| 
       173 
     | 
    
         
            -
                  - '0. 
     | 
| 
      
 713 
     | 
    
         
            +
                  - '0.004601'
         
     | 
| 
       174 
714 
     | 
    
         
             
                  Server:
         
     | 
| 
       175 
715 
     | 
    
         
             
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
       176 
716 
     | 
    
         
             
                  Date:
         
     | 
| 
       177 
     | 
    
         
            -
                  - Sat,  
     | 
| 
      
 717 
     | 
    
         
            +
                  - Sat, 20 Sep 2014 14:14:33 GMT
         
     | 
| 
       178 
718 
     | 
    
         
             
                  Content-Length:
         
     | 
| 
       179 
     | 
    
         
            -
                  - ' 
     | 
| 
      
 719 
     | 
    
         
            +
                  - '236'
         
     | 
| 
       180 
720 
     | 
    
         
             
                  Connection:
         
     | 
| 
       181 
721 
     | 
    
         
             
                  - Keep-Alive
         
     | 
| 
       182 
722 
     | 
    
         
             
                body:
         
     | 
| 
         @@ -185,27 +725,27 @@ http_interactions: 
     | 
|
| 
       185 
725 
     | 
    
         
             
                    {
         
     | 
| 
       186 
726 
     | 
    
         
             
                      "_links": {
         
     | 
| 
       187 
727 
     | 
    
         
             
                        "self": {
         
     | 
| 
       188 
     | 
    
         
            -
                          "href": "http://localhost:3000/ 
     | 
| 
      
 728 
     | 
    
         
            +
                          "href": "http://localhost:3000/"
         
     | 
| 
       189 
729 
     | 
    
         
             
                        },
         
     | 
| 
       190 
730 
     | 
    
         
             
                        "surveys": {
         
     | 
| 
       191 
     | 
    
         
            -
                          "href": " 
     | 
| 
      
 731 
     | 
    
         
            +
                          "href": "api/surveys"
         
     | 
| 
       192 
732 
     | 
    
         
             
                        },
         
     | 
| 
       193 
733 
     | 
    
         
             
                        "users": {
         
     | 
| 
       194 
     | 
    
         
            -
                          "href": " 
     | 
| 
      
 734 
     | 
    
         
            +
                          "href": "api/users"
         
     | 
| 
       195 
735 
     | 
    
         
             
                        },
         
     | 
| 
       196 
736 
     | 
    
         
             
                        "questions": {
         
     | 
| 
       197 
     | 
    
         
            -
                          "href": " 
     | 
| 
      
 737 
     | 
    
         
            +
                          "href": "api/questions"
         
     | 
| 
       198 
738 
     | 
    
         
             
                        }
         
     | 
| 
       199 
739 
     | 
    
         
             
                      }
         
     | 
| 
       200 
740 
     | 
    
         
             
                    }
         
     | 
| 
       201 
741 
     | 
    
         
             
                http_version: 
         
     | 
| 
       202 
     | 
    
         
            -
              recorded_at: Sat,  
     | 
| 
      
 742 
     | 
    
         
            +
              recorded_at: Sat, 20 Sep 2014 14:14:33 GMT
         
     | 
| 
       203 
743 
     | 
    
         
             
            - request:
         
     | 
| 
       204 
744 
     | 
    
         
             
                method: post
         
     | 
| 
       205 
     | 
    
         
            -
                uri: http://localhost:3000/api/ 
     | 
| 
      
 745 
     | 
    
         
            +
                uri: http://localhost:3000/api/users/
         
     | 
| 
       206 
746 
     | 
    
         
             
                body:
         
     | 
| 
       207 
747 
     | 
    
         
             
                  encoding: UTF-8
         
     | 
| 
       208 
     | 
    
         
            -
                  string:  
     | 
| 
      
 748 
     | 
    
         
            +
                  string: "{}"
         
     | 
| 
       209 
749 
     | 
    
         
             
                headers:
         
     | 
| 
       210 
750 
     | 
    
         
             
                  User-Agent:
         
     | 
| 
       211 
751 
     | 
    
         
             
                  - Faraday v0.9.0
         
     | 
| 
         @@ -233,39 +773,108 @@ http_interactions: 
     | 
|
| 
       233 
773 
     | 
    
         
             
                  Content-Type:
         
     | 
| 
       234 
774 
     | 
    
         
             
                  - application/json; charset=utf-8
         
     | 
| 
       235 
775 
     | 
    
         
             
                  Etag:
         
     | 
| 
       236 
     | 
    
         
            -
                  - '" 
     | 
| 
      
 776 
     | 
    
         
            +
                  - '"51133139db8aa030dcb0d8523d9d6b67"'
         
     | 
| 
       237 
777 
     | 
    
         
             
                  Cache-Control:
         
     | 
| 
       238 
778 
     | 
    
         
             
                  - max-age=0, private, must-revalidate
         
     | 
| 
       239 
779 
     | 
    
         
             
                  X-Request-Id:
         
     | 
| 
       240 
     | 
    
         
            -
                  -  
     | 
| 
      
 780 
     | 
    
         
            +
                  - 19d5de1c-dcff-4699-88de-3af810f74eb7
         
     | 
| 
       241 
781 
     | 
    
         
             
                  X-Runtime:
         
     | 
| 
       242 
     | 
    
         
            -
                  - '0. 
     | 
| 
      
 782 
     | 
    
         
            +
                  - '0.007335'
         
     | 
| 
       243 
783 
     | 
    
         
             
                  Server:
         
     | 
| 
       244 
784 
     | 
    
         
             
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
       245 
785 
     | 
    
         
             
                  Date:
         
     | 
| 
       246 
     | 
    
         
            -
                  - Sat,  
     | 
| 
      
 786 
     | 
    
         
            +
                  - Sat, 20 Sep 2014 14:14:33 GMT
         
     | 
| 
       247 
787 
     | 
    
         
             
                  Content-Length:
         
     | 
| 
       248 
     | 
    
         
            -
                  - ' 
     | 
| 
      
 788 
     | 
    
         
            +
                  - '270'
         
     | 
| 
       249 
789 
     | 
    
         
             
                  Connection:
         
     | 
| 
       250 
790 
     | 
    
         
             
                  - Keep-Alive
         
     | 
| 
       251 
791 
     | 
    
         
             
                body:
         
     | 
| 
       252 
792 
     | 
    
         
             
                  encoding: UTF-8
         
     | 
| 
       253 
793 
     | 
    
         
             
                  string: |-
         
     | 
| 
       254 
794 
     | 
    
         
             
                    {
         
     | 
| 
       255 
     | 
    
         
            -
                      "id":  
     | 
| 
       256 
     | 
    
         
            -
                      " 
     | 
| 
      
 795 
     | 
    
         
            +
                      "id": 7,
         
     | 
| 
      
 796 
     | 
    
         
            +
                      "service_user_id": "9d478ee79f431c1667f39d26c8069fa197a0d914f318764ffb4bab6b6c4f135f",
         
     | 
| 
       257 
797 
     | 
    
         
             
                      "_links": {
         
     | 
| 
       258 
798 
     | 
    
         
             
                        "self": {
         
     | 
| 
       259 
     | 
    
         
            -
                          "href": "http://localhost:3000/api/ 
     | 
| 
      
 799 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/users/7"
         
     | 
| 
      
 800 
     | 
    
         
            +
                        }
         
     | 
| 
      
 801 
     | 
    
         
            +
                      },
         
     | 
| 
      
 802 
     | 
    
         
            +
                      "token": "4543370e5117e89c5339671f6f2f5b057e1e2b40f6ec4380f5447bb99b15a922"
         
     | 
| 
      
 803 
     | 
    
         
            +
                    }
         
     | 
| 
      
 804 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 805 
     | 
    
         
            +
              recorded_at: Sat, 20 Sep 2014 14:14:33 GMT
         
     | 
| 
      
 806 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 807 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 808 
     | 
    
         
            +
                uri: http://localhost:3000/api/surveys/
         
     | 
| 
      
 809 
     | 
    
         
            +
                body:
         
     | 
| 
      
 810 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 811 
     | 
    
         
            +
                  string: '{"survey":{"user_id":7}}'
         
     | 
| 
      
 812 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 813 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 814 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 815 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 816 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 817 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 818 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 819 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 820 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 821 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 822 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 823 
     | 
    
         
            +
              response:
         
     | 
| 
      
 824 
     | 
    
         
            +
                status:
         
     | 
| 
      
 825 
     | 
    
         
            +
                  code: 201
         
     | 
| 
      
 826 
     | 
    
         
            +
                  message: 'Created '
         
     | 
| 
      
 827 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 828 
     | 
    
         
            +
                  X-Frame-Options:
         
     | 
| 
      
 829 
     | 
    
         
            +
                  - SAMEORIGIN
         
     | 
| 
      
 830 
     | 
    
         
            +
                  X-Xss-Protection:
         
     | 
| 
      
 831 
     | 
    
         
            +
                  - 1; mode=block
         
     | 
| 
      
 832 
     | 
    
         
            +
                  X-Content-Type-Options:
         
     | 
| 
      
 833 
     | 
    
         
            +
                  - nosniff
         
     | 
| 
      
 834 
     | 
    
         
            +
                  X-Ua-Compatible:
         
     | 
| 
      
 835 
     | 
    
         
            +
                  - chrome=1
         
     | 
| 
      
 836 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 837 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 838 
     | 
    
         
            +
                  Etag:
         
     | 
| 
      
 839 
     | 
    
         
            +
                  - '"240bc199d6790757757df177994640fe"'
         
     | 
| 
      
 840 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 841 
     | 
    
         
            +
                  - max-age=0, private, must-revalidate
         
     | 
| 
      
 842 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 843 
     | 
    
         
            +
                  - 34747ec2-bfda-4848-802b-6dde210f8a5a
         
     | 
| 
      
 844 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 845 
     | 
    
         
            +
                  - '0.010171'
         
     | 
| 
      
 846 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 847 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 848 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 849 
     | 
    
         
            +
                  - Sat, 20 Sep 2014 14:14:33 GMT
         
     | 
| 
      
 850 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 851 
     | 
    
         
            +
                  - '353'
         
     | 
| 
      
 852 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 853 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 854 
     | 
    
         
            +
                body:
         
     | 
| 
      
 855 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 856 
     | 
    
         
            +
                  string: |-
         
     | 
| 
      
 857 
     | 
    
         
            +
                    {
         
     | 
| 
      
 858 
     | 
    
         
            +
                      "id": 7,
         
     | 
| 
      
 859 
     | 
    
         
            +
                      "user_id": 7,
         
     | 
| 
      
 860 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 861 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 862 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/surveys/7"
         
     | 
| 
       260 
863 
     | 
    
         
             
                        },
         
     | 
| 
       261 
     | 
    
         
            -
                        " 
     | 
| 
       262 
     | 
    
         
            -
                          " 
     | 
| 
      
 864 
     | 
    
         
            +
                        "survey_questions": {
         
     | 
| 
      
 865 
     | 
    
         
            +
                          "post": {
         
     | 
| 
      
 866 
     | 
    
         
            +
                            "href": "/api/surveys/7/survey_questions"
         
     | 
| 
      
 867 
     | 
    
         
            +
                          },
         
     | 
| 
      
 868 
     | 
    
         
            +
                          "put": {
         
     | 
| 
      
 869 
     | 
    
         
            +
                            "href": "/api/surveys/7/survey_questions"
         
     | 
| 
      
 870 
     | 
    
         
            +
                          }
         
     | 
| 
       263 
871 
     | 
    
         
             
                        }
         
     | 
| 
       264 
872 
     | 
    
         
             
                      },
         
     | 
| 
      
 873 
     | 
    
         
            +
                      "completed": false,
         
     | 
| 
       265 
874 
     | 
    
         
             
                      "survey_questions": [
         
     | 
| 
       266 
875 
     | 
    
         | 
| 
       267 
876 
     | 
    
         
             
                      ]
         
     | 
| 
       268 
877 
     | 
    
         
             
                    }
         
     | 
| 
       269 
878 
     | 
    
         
             
                http_version: 
         
     | 
| 
       270 
     | 
    
         
            -
              recorded_at: Sat,  
     | 
| 
      
 879 
     | 
    
         
            +
              recorded_at: Sat, 20 Sep 2014 14:14:33 GMT
         
     | 
| 
       271 
880 
     | 
    
         
             
            recorded_with: VCR 2.6.0
         
     |