]> cat aescling's git repositories - mastodon.git/commitdiff
ActiveRecord::NotFound is not defined (#1864)
authoralpaca-tc <alpaca-tc@alpaca.tc>
Sat, 15 Apr 2017 19:17:59 +0000 (04:17 +0900)
committerEugen <eugen@zeonfederated.com>
Sat, 15 Apr 2017 19:17:59 +0000 (21:17 +0200)
app/controllers/api/oembed_controller.rb

index 379e910e63b839e7c1f4d28d890af47fe77d427f..2ea48229669418b310595dc4a3a244e117cfea3b 100644 (file)
@@ -14,7 +14,7 @@ class Api::OEmbedController < ApiController
   def stream_entry_from_url(url)
     params = Rails.application.routes.recognize_path(url)
 
-    raise ActiveRecord::NotFound unless params[:controller] == 'stream_entries' && params[:action] == 'show'
+    raise ActiveRecord::RecordNotFound unless params[:controller] == 'stream_entries' && params[:action] == 'show'
 
     StreamEntry.find(params[:id])
   end