4589360dd1
so we don't disturb the rest of the edit page.
15 lines
521 B
Ruby
15 lines
521 B
Ruby
class Collections::PublicationsController < ApplicationController
|
|
include CollectionScoped
|
|
|
|
def create
|
|
@collection.publish
|
|
render turbo_stream: turbo_stream.replace([ @collection, :publication ], partial: "collections/edit/publication", locals: { collection: @collection })
|
|
end
|
|
|
|
def destroy
|
|
@collection.unpublish
|
|
@collection.reload
|
|
render turbo_stream: turbo_stream.replace([ @collection, :publication ], partial: "collections/edit/publication", locals: { collection: @collection })
|
|
end
|
|
end
|