mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 00:54:49 +01:00
ActiveRecord::NotFound is not defined (#1864)
This commit is contained in:
parent
28606d730a
commit
00392d3c63
@ -14,7 +14,7 @@ class Api::OEmbedController < ApiController
|
|||||||
def stream_entry_from_url(url)
|
def stream_entry_from_url(url)
|
||||||
params = Rails.application.routes.recognize_path(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])
|
StreamEntry.find(params[:id])
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user