mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:20:43 +08:00
3882722195
see: https://meta.discourse.org/t/mini-inline-onebox-support-rfc/66400?source_topic_id=66066
11 lines
255 B
Ruby
11 lines
255 B
Ruby
require_dependency 'inline_oneboxer'
|
|
|
|
class InlineOneboxController < ApplicationController
|
|
before_filter :ensure_logged_in
|
|
|
|
def show
|
|
oneboxes = InlineOneboxer.new(params[:urls]).process
|
|
render json: { "inline-oneboxes" => oneboxes }
|
|
end
|
|
end
|