Advertisement
Guest User

Untitled

a guest
Jun 10th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.76 KB | None | 0 0
  1. def exec_no_cache(sql, name, binds)
  2. type_casted_binds = binds.map { |attr| type_cast(attr.value_for_database) }
  3. log(sql, name, binds) { @connection.async_exec(sql, type_casted_binds) } [HIGHLIGHTING THIS LINE]
  4. end
  5.  
  6. def exec_cache(sql, name, binds)
  7.  
  8. Kegans-MacBook-Pro:MyApp Kegan$ rails s
  9. Array values in the parameter to `Gem.paths=` are deprecated.
  10. Please use a String or nil.
  11. An Array ({"GEM_PATH"=>["/Users/Kegan/.rvm/gems/ruby-2.3.1", "/Users/Kegan/.rvm/gems/ruby-2.3.1@global"]}) was passed in from bin/rails:3:in `load'
  12. => Booting Puma
  13. => Rails 5.0.0.rc1 application starting in development on http://localhost:3000
  14. => Run `rails server -h` for more startup options
  15. [Simple Form] Simple Form is not configured in the application and will use the default values. Use `rails generate simple_form:install` to generate the Simple Form configuration.
  16. Puma starting in single mode...
  17. * Version 3.4.0 (ruby 2.3.1-p112), codename: Owl Bowl Brawl
  18. * Min threads: 5, max threads: 5
  19. * Environment: development
  20. * Listening on tcp://localhost:3000
  21. Use Ctrl-C to stop
  22. Started GET "/" for ::1 at 2016-06-10 14:15:05 -0600
  23. ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
  24. Processing by HomeController#index as HTML
  25. Rendering home/index.html.erb within layouts/application
  26. User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 6], ["LIMIT", 1]]
  27. Link Load (0.5ms) SELECT "links".* FROM "links" ORDER BY "links"."id" DESC LIMIT $1 [["LIMIT", 1]]
  28. CACHE (0.0ms) SELECT "links".* FROM "links" ORDER BY "links"."id" DESC LIMIT $1 [["LIMIT", 1]]
  29. User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
  30. (1.0ms) SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = $1 AND "votes"."votable_type" = $2 AND "votes"."vote_flag" = $3 AND "votes"."vote_scope" IS NULL [["votable_id", 8], ["votable_type", "Link"], ["vote_flag", true]]
  31. (0.4ms) SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = $1 AND "votes"."votable_type" = $2 AND "votes"."vote_flag" = $3 AND "votes"."vote_scope" IS NULL [["votable_id", 8], ["votable_type", "Link"], ["vote_flag", false]]
  32. Forum Load (0.5ms) SELECT "forums".* FROM "forums" ORDER BY "forums"."id" DESC LIMIT $1 [["LIMIT", 1]]
  33. CACHE (0.0ms) SELECT "forums".* FROM "forums" ORDER BY "forums"."id" DESC LIMIT $1 [["LIMIT", 1]]
  34. CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
  35. Rendered home/index.html.erb within layouts/application (84.0ms)
  36. Completed 200 OK in 291ms (Views: 263.2ms | ActiveRecord: 16.4ms)
  37.  
  38.  
  39. Started GET "/cable" for ::1 at 2016-06-10 14:15:05 -0600
  40. Started GET "/cable/" [WebSocket] for ::1 at 2016-06-10 14:15:05 -0600
  41. Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
  42. User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
  43. [ActionCable] [joshgamer1@gmail.com] Registered connection (Z2lkOi8va29ob3JkL1VzZXIvNg)
  44. [ActionCable] [joshgamer1@gmail.com] RoomChannel is transmitting the subscription confirmation
  45. [ActionCable] [joshgamer1@gmail.com] RoomChannel is streaming from room_channel
  46. Started GET "/users/edit" for ::1 at 2016-06-10 14:15:10 -0600
  47. Processing by Devise::RegistrationsController#edit as HTML
  48. User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 6], ["LIMIT", 1]]
  49. DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.2.
  50. Please use the `permit` method:
  51.  
  52. devise_parameter_sanitizer.permit(:sign_up) do |user|
  53. # Your block here.
  54. end
  55. (called from configure_permitted_parameters at /Users/Kegan/Documents/AppDev/myApp/app/controllers/application_controller.rb:10)
  56. DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.2.
  57. Please use the `permit` method:
  58.  
  59. devise_parameter_sanitizer.permit(:account_update) do |user|
  60. # Your block here.
  61. end
  62. (called from configure_permitted_parameters at /Users/Kegan/Documents/AppDev/MyApp/app/controllers/application_controller.rb:11)
  63. Rendering devise/registrations/edit.html.erb within layouts/application
  64. Rendered devise/registrations/edit.html.erb within layouts/application (14.5ms)
  65. Completed 200 OK in 81ms (Views: 77.5ms | ActiveRecord: 0.5ms)
  66.  
  67.  
  68. Started DELETE "/users" for ::1 at 2016-06-10 14:15:18 -0600
  69. Processing by Devise::RegistrationsController#destroy as HTML
  70. Parameters: {"utf8"=>"✓", "authenticity_token"=>"9Ou51KmxWKW+SheDAZl86Rtb8jMQBDSVZswiwfkHxUpg2b4DA/9xneXzPXsckQ7V6oy6MqBkWPctS24X1Z9V7w==", "user"=>{"avatar"=>"", "name"=>"Joshua Artos", "email"=>"joshgamer1@gmail.com", "password"=>"[FILTERED]", "bio"=>"Josh. Kick ass at video games.", "location"=>"Fort Collins", "age"=>"18", "gender"=>"Doesn't Matter", "interestedin"=>"Netfix", "major"=>"Doesn't Matter", "twitterurl"=>"", "instagramurl"=>"", "current_password"=>"[FILTERED]"}, "commit"=>"Update"}
  71. User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 6], ["LIMIT", 1]]
  72. DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.2.
  73. Please use the `permit` method:
  74.  
  75. devise_parameter_sanitizer.permit(:sign_up) do |user|
  76. # Your block here.
  77. end
  78. (called from configure_permitted_parameters at /Users/Kegan/Documents/AppDev/MyApp/app/controllers/application_controller.rb:10)
  79. DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.2.
  80. Please use the `permit` method:
  81.  
  82. devise_parameter_sanitizer.permit(:account_update) do |user|
  83. # Your block here.
  84. end
  85. (called from configure_permitted_parameters at /Users/Kegan/Documents/MyApp/Kohord/app/controllers/application_controller.rb:11)
  86. (0.1ms) BEGIN
  87. SQL (2.3ms) DELETE FROM "users" WHERE "users"."id" = $1 [["id", 6]]
  88. (0.1ms) ROLLBACK
  89. Completed 500 Internal Server Error in 10ms (ActiveRecord: 3.0ms)
  90.  
  91.  
  92.  
  93. ActiveRecord::InvalidForeignKey (PG::ForeignKeyViolation: ERROR: update or delete on table "users" violates foreign key constraint "fk_rails_03de2dc08c" on table "comments"
  94. DETAIL: Key (id)=(6) is still referenced from table "comments".
  95. : DELETE FROM "users" WHERE "users"."id" = $1):
  96.  
  97. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `async_exec'
  98. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `block in exec_no_cache'
  99. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/abstract_adapter.rb:566:in `block in log'
  100. activesupport (5.0.0.rc1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
  101. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/abstract_adapter.rb:560:in `log'
  102. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `exec_no_cache'
  103. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/postgresql_adapter.rb:587:in `execute_and_clear'
  104. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/postgresql/database_statements.rb:116:in `exec_delete'
  105. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/abstract/database_statements.rb:140:in `delete'
  106. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `delete'
  107. activerecord (5.0.0.rc1) lib/active_record/relation.rb:543:in `delete_all'
  108. activerecord (5.0.0.rc1) lib/active_record/persistence.rb:525:in `destroy_row'
  109. activerecord (5.0.0.rc1) lib/active_record/counter_cache.rb:141:in `destroy_row'
  110. activerecord (5.0.0.rc1) lib/active_record/locking/optimistic.rb:115:in `destroy_row'
  111. activerecord (5.0.0.rc1) lib/active_record/persistence.rb:184:in `destroy'
  112. activerecord (5.0.0.rc1) lib/active_record/callbacks.rb:283:in `block in destroy'
  113. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:126:in `call'
  114. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
  115. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:455:in `call'
  116. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
  117. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:750:in `_run_destroy_callbacks'
  118. activerecord (5.0.0.rc1) lib/active_record/callbacks.rb:283:in `destroy'
  119. activerecord (5.0.0.rc1) lib/active_record/transactions.rb:314:in `block in destroy'
  120. activerecord (5.0.0.rc1) lib/active_record/transactions.rb:395:in `block in with_transaction_returning_status'
  121. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
  122. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
  123. activerecord (5.0.0.rc1) lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
  124. activerecord (5.0.0.rc1) lib/active_record/transactions.rb:211:in `transaction'
  125. activerecord (5.0.0.rc1) lib/active_record/transactions.rb:392:in `with_transaction_returning_status'
  126. activerecord (5.0.0.rc1) lib/active_record/transactions.rb:314:in `destroy'
  127. devise (4.1.1) app/controllers/devise/registrations_controller.rb:66:in `destroy'
  128. actionpack (5.0.0.rc1) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
  129. actionpack (5.0.0.rc1) lib/abstract_controller/base.rb:181:in `process_action'
  130. actionpack (5.0.0.rc1) lib/action_controller/metal/rendering.rb:30:in `process_action'
  131. actionpack (5.0.0.rc1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  132. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:126:in `call'
  133. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
  134. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:455:in `call'
  135. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
  136. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
  137. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:90:in `run_callbacks'
  138. actionpack (5.0.0.rc1) lib/abstract_controller/callbacks.rb:19:in `process_action'
  139. actionpack (5.0.0.rc1) lib/action_controller/metal/rescue.rb:31:in `process_action'
  140. actionpack (5.0.0.rc1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  141. activesupport (5.0.0.rc1) lib/active_support/notifications.rb:164:in `block in instrument'
  142. activesupport (5.0.0.rc1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
  143. activesupport (5.0.0.rc1) lib/active_support/notifications.rb:164:in `instrument'
  144. actionpack (5.0.0.rc1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  145. actionpack (5.0.0.rc1) lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
  146. activerecord (5.0.0.rc1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  147. actionpack (5.0.0.rc1) lib/abstract_controller/base.rb:126:in `process'
  148. actionview (5.0.0.rc1) lib/action_view/rendering.rb:30:in `process'
  149. actionpack (5.0.0.rc1) lib/action_controller/metal.rb:190:in `dispatch'
  150. actionpack (5.0.0.rc1) lib/action_controller/metal.rb:262:in `dispatch'
  151. actionpack (5.0.0.rc1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
  152. actionpack (5.0.0.rc1) lib/action_dispatch/routing/route_set.rb:32:in `serve'
  153. actionpack (5.0.0.rc1) lib/action_dispatch/routing/mapper.rb:16:in `block in <class:Constraints>'
  154. actionpack (5.0.0.rc1) lib/action_dispatch/routing/mapper.rb:46:in `serve'
  155. actionpack (5.0.0.rc1) lib/action_dispatch/journey/router.rb:39:in `block in serve'
  156. actionpack (5.0.0.rc1) lib/action_dispatch/journey/router.rb:26:in `each'
  157. actionpack (5.0.0.rc1) lib/action_dispatch/journey/router.rb:26:in `serve'
  158. actionpack (5.0.0.rc1) lib/action_dispatch/routing/route_set.rb:725:in `call'
  159. actionview (5.0.0.rc1) lib/action_view/digestor.rb:12:in `call'
  160. warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
  161. warden (1.2.6) lib/warden/manager.rb:34:in `catch'
  162. warden (1.2.6) lib/warden/manager.rb:34:in `call'
  163. rack (2.0.0.rc1) lib/rack/etag.rb:25:in `call'
  164. rack (2.0.0.rc1) lib/rack/conditional_get.rb:38:in `call'
  165. rack (2.0.0.rc1) lib/rack/head.rb:12:in `call'
  166. rack (2.0.0.rc1) lib/rack/session/abstract/id.rb:222:in `context'
  167. rack (2.0.0.rc1) lib/rack/session/abstract/id.rb:216:in `call'
  168. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/cookies.rb:613:in `call'
  169. activerecord (5.0.0.rc1) lib/active_record/migration.rb:552:in `call'
  170. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
  171. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
  172. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
  173. activesupport (5.0.0.rc1) lib/active_support/callbacks.rb:90:in `run_callbacks'
  174. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
  175. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/executor.rb:12:in `call'
  176. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
  177. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
  178. web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
  179. web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
  180. web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
  181. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
  182. railties (5.0.0.rc1) lib/rails/rack/logger.rb:36:in `call_app'
  183. railties (5.0.0.rc1) lib/rails/rack/logger.rb:24:in `block in call'
  184. activesupport (5.0.0.rc1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
  185. activesupport (5.0.0.rc1) lib/active_support/tagged_logging.rb:26:in `tagged'
  186. activesupport (5.0.0.rc1) lib/active_support/tagged_logging.rb:70:in `tagged'
  187. railties (5.0.0.rc1) lib/rails/rack/logger.rb:24:in `call'
  188. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
  189. rack (2.0.0.rc1) lib/rack/method_override.rb:22:in `call'
  190. rack (2.0.0.rc1) lib/rack/runtime.rb:22:in `call'
  191. activesupport (5.0.0.rc1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  192. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/executor.rb:12:in `call'
  193. actionpack (5.0.0.rc1) lib/action_dispatch/middleware/static.rb:136:in `call'
  194. rack (2.0.0.rc1) lib/rack/sendfile.rb:111:in `call'
  195. railties (5.0.0.rc1) lib/rails/engine.rb:522:in `call'
  196. puma (3.4.0) lib/puma/configuration.rb:224:in `call'
  197. puma (3.4.0) lib/puma/server.rb:569:in `handle_request'
  198. puma (3.4.0) lib/puma/server.rb:406:in `process_client'
  199. puma (3.4.0) lib/puma/server.rb:271:in `block in run'
  200. puma (3.4.0) lib/puma/thread_pool.rb:114:in `block in spawn_thread'
  201. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout
  202. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb
  203. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.5ms)
  204. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
  205. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.8ms)
  206. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
  207. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.6ms)
  208. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (52.5ms)
  209. DEPRECATION WARNING: #original_exception is deprecated. Use #cause instead. (called from status_code_with_paginate at /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/will_paginate-3.1.0/lib/will_paginate/railtie.rb:49)
  210. DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change `Mime::HTML` to `Mime[:html]`. (called from const_missing at /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/http/mime_type.rb:52)
  211. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb
  212. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/_markup.html.erb (0.7ms)
  213. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript
  214. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string
  215. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (0.2ms)
  216. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string
  217. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.6ms)
  218. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string
  219. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.2ms)
  220. DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change `Mime::WEB_CONSOLE_V2` to `Mime[:web_console_v2]`. (called from const_missing at /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/actionpack-5.0.0.rc1/lib/action_dispatch/http/mime_type.rb:52)
  221. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript (42.2ms)
  222. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript
  223. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript (0.8ms)
  224. Rendering /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript
  225. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.8ms)
  226. Rendered /Users/KingKegan/.rvm/gems/ruby-2.3.1/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb (94.0ms)
  227. [ActionCable] [joshgamer1@gmail.com] Finished "/cable/" [WebSocket] for ::1 at 2016-06-10 14:15:18 -0600
  228. [ActionCable] [joshgamer1@gmail.com] RoomChannel stopped streaming from room_channel
  229. Started GET "/cable" for ::1 at 2016-06-10 14:15:21 -0600
  230. Started GET "/cable/" [WebSocket] for ::1 at 2016-06-10 14:15:21 -0600
  231. Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
  232. User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
  233. [ActionCable] [joshgamer1@gmail.com] Registered connection (Z2lkOi8va29ob3JkL1VzZXIvNg)
  234. [ActionCable] [joshgamer1@gmail.com] RoomChannel is transmitting the subscription confirmation
  235. [ActionCable] [joshgamer1@gmail.com] RoomChannel is streaming from room_channel
  236. Started PUT "/users" for ::1 at 2016-06-10 14:15:28 -0600
  237. Processing by Devise::RegistrationsController#update as HTML
  238. Parameters: {"utf8"=>"✓", "authenticity_token"=>"MfnKmUW4Xfct9NyjC9bbwfEDusLvTYXHQRuqyltHr1yly81O7/Z0z3ZN9lsW3qn9ANTyw18t6aUKnOYcd98/+Q==", "user"=>{"avatar"=>"", "name"=>"Joshua Artos", "email"=>"joshgamer1@gmail.com", "password"=>"[FILTERED]", "bio"=>"Josh. Kick ass at video games.", "location"=>"Fort Collins", "age"=>"18", "gender"=>"Doesn't Matter", "interestedin"=>"Netfix", "major"=>"Doesn't Matter", "twitterurl"=>"", "instagramurl"=>"", "current_password"=>"[FILTERED]"}, "commit"=>"Update"}
  239. User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 6], ["LIMIT", 1]]
  240. DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(sign_up) is deprecated and it will be removed from Devise 4.2.
  241. Please use the `permit` method:
  242.  
  243. devise_parameter_sanitizer.permit(:sign_up) do |user|
  244. # Your block here.
  245. end
  246. (called from configure_permitted_parameters at /Users/Kegan/Documents/AppDev/MyApp/app/controllers/application_controller.rb:10)
  247. DEPRECATION WARNING: [Devise] Changing the sanitized parameters through "Devise::ParameterSanitizer#for(account_update) is deprecated and it will be removed from Devise 4.2.
  248. Please use the `permit` method:
  249.  
  250. devise_parameter_sanitizer.permit(:account_update) do |user|
  251. # Your block here.
  252. end
  253. (called from configure_permitted_parameters at /Users/Kegan/Documents/AppDev/MyApp/app/controllers/application_controller.rb:11)
  254. User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
  255. (0.2ms) BEGIN
  256. (0.2ms) COMMIT
  257. Redirected to http://localhost:3000/
  258. Completed 302 Found in 94ms (ActiveRecord: 1.3ms)
  259.  
  260.  
  261. Started GET "/" for ::1 at 2016-06-10 14:15:28 -0600
  262. Processing by HomeController#index as HTML
  263. Rendering home/index.html.erb within layouts/application
  264. User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 6], ["LIMIT", 1]]
  265. Link Load (0.3ms) SELECT "links".* FROM "links" ORDER BY "links"."id" DESC LIMIT $1 [["LIMIT", 1]]
  266. CACHE (0.0ms) SELECT "links".* FROM "links" ORDER BY "links"."id" DESC LIMIT $1 [["LIMIT", 1]]
  267. User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
  268. (0.5ms) SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = $1 AND "votes"."votable_type" = $2 AND "votes"."vote_flag" = $3 AND "votes"."vote_scope" IS NULL [["votable_id", 8], ["votable_type", "Link"], ["vote_flag", true]]
  269. (0.9ms) SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = $1 AND "votes"."votable_type" = $2 AND "votes"."vote_flag" = $3 AND "votes"."vote_scope" IS NULL [["votable_id", 8], ["votable_type", "Link"], ["vote_flag", false]]
  270. Forum Load (0.3ms) SELECT "forums".* FROM "forums" ORDER BY "forums"."id" DESC LIMIT $1 [["LIMIT", 1]]
  271. CACHE (0.0ms) SELECT "forums".* FROM "forums" ORDER BY "forums"."id" DESC LIMIT $1 [["LIMIT", 1]]
  272. CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
  273. Rendered home/index.html.erb within layouts/application (14.5ms)
  274. Completed 200 OK in 56ms (Views: 51.7ms | ActiveRecord: 2.8ms)
  275.  
  276.  
  277. [ActionCable] [joshgamer1@gmail.com] Finished "/cable/" [WebSocket] for ::1 at 2016-06-10 14:15:28 -0600
  278. [ActionCable] [joshgamer1@gmail.com] RoomChannel stopped streaming from room_channel
  279. Started GET "/cable" for ::1 at 2016-06-10 14:15:28 -0600
  280. Started GET "/cable/" [WebSocket] for ::1 at 2016-06-10 14:15:28 -0600
  281.  
  282. class User < ApplicationRecord
  283. # Include default devise modules. Others available are:
  284. # :confirmable, :lockable, :timeoutable and :omniauthable
  285. devise :database_authenticatable, :registerable,
  286. :recoverable, :rememberable, :trackable, :validatable
  287.  
  288. has_many :forums
  289. has_many :links
  290. has_many :discussions
  291. has_many :comments
  292.  
  293. has_many :chats
  294. has_many :chatrooms, through: :chats
  295.  
  296.  
  297.  
  298.  
  299. # It returns the articles whose titles contain one or more words that form the query
  300. def self.search(query)
  301. # where(:title, query) -> This would return an exact match of the query
  302. where("name like ?", "%#{query}%")
  303. end
  304.  
  305.  
  306. has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100#" }, :default_url => "/images/:style/missingMike.png"
  307. validates_attachment_content_type :avatar, :content_type => /Aimage/.*Z/
  308. end
  309.  
  310. class UsersController < ApplicationController
  311.  
  312.  
  313. def index
  314.  
  315. if params[:search]
  316. @users = User.search(params[:search])
  317. @users = @users.paginate(:page => params[:page], :per_page => 5)
  318. else
  319. @users = User.paginate(:page => params[:page], :per_page => 2)
  320. end
  321. end
  322.  
  323.  
  324. def show
  325. @user = User.find(params[:id])
  326. @user_links = @user.links
  327. @user_comments = @user.comments
  328. @user_forums = @user.forums
  329. @user_discussions = @user.discussions
  330.  
  331. end
  332.  
  333. def goAnonymous
  334. @user = User.find(params[:id])
  335. @user.anonymous = true
  336. redirect_to :back
  337. end
  338.  
  339. def leaveAnonymous
  340. @user = User.find(params[:id])
  341. @user.anonymous = false
  342. redirect_to :back
  343. end
  344.  
  345. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement