mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 11:42:19 -05:00
12 lines
351 B
Ruby
12 lines
351 B
Ruby
module LinkableController
|
|
extend ActiveSupport::Concern
|
|
|
|
def sync
|
|
link = @linkable&.links&.find(params[:link])
|
|
# Enqueue the sync
|
|
link&.update_metadata_from_link_later
|
|
# Back to the model page
|
|
redirect_back_or_to @linkable, notice: link ? t("concerns.linkable.sync.success") : t("concerns.linkable.sync.bad_request")
|
|
end
|
|
end
|