Module: LinkableController

Extended by:
ActiveSupport::Concern
Included in:
CollectionsController, CreatorsController, ModelsController
Defined in:
app/controllers/concerns/linkable_controller.rb

Instance Method Summary collapse

Instance Method Details

#sync ⇒ Object



4
5
6
7
8
9
10
# File 'app/controllers/concerns/linkable_controller.rb', line 4

def sync
  link = @linkable&.links&.find(params[:link])
  # Enqueue the sync
  link&.
  # Back to the model page
  redirect_back_or_to @linkable, notice: link ? t("concerns.linkable.sync.success") : t("concerns.linkable.sync.bad_request")
end