Sha256: 70f69ef0f3fe4e8e9a4b0dd989b25f7ab4862519c71c0efc37cf6b2574b2d0fc

Contents?: true

Size: 551 Bytes

Versions: 19

Compression:

Stored size: 551 Bytes

Contents

module Controller
  module AwesomeNestedSetConcern
    extend ActiveSupport::Concern

    def reposition
      @resource = load_resource
      @dropped_resource = resource_class.find(params[:dropped_id])
      @dropped_resource.move_to_right_of(@resource)
      redirect_to collection_path, notice: I18n.t("awesome_nested_set.inserted_after", target_resource: @resource.try_all(*Itsf::Backend::Configuration.resource_title_methods), inserted_resource: @dropped_resource.try_all(*Itsf::Backend::Configuration.resource_title_methods))
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
itsf_backend-4.2.3 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-4.2.2 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-4.2.1 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-4.2.0 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-4.0.1 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-4.0.0 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.1.1 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.1.0 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.0.7 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.0.6 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.0.5 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.0.4 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.0.3 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.0.2 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.0.1 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-3.0.0 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-2.2.1 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-2.2.0 app/controllers/concerns/controller/awesome_nested_set_concern.rb
itsf_backend-2.1.0 app/controllers/concerns/controller/awesome_nested_set_concern.rb