Sha256: 0245464115f333e84d70e335aa21a81bff28e9fc09545c238b3dbc83700476a1

Contents?: true

Size: 436 Bytes

Versions: 21

Compression:

Stored size: 436 Bytes

Contents

class Ksk::NavigationsController < Bhf::ApplicationController

  def sort
    Navigation.sort_items(params_navigation)
    Navigation.find(params[:id]).update_attribute(:parent_id, params[:parent_id])
    head :ok
  end

  def create
    n = Navigation.new(params_navigation)
    n.save
    render text: n.id
  end
  
  private
    def params_navigation
      ActionController::Parameters.new(params[:navigation]).permit!
    end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ksk-0.4.7 app/controllers/ksk/navigations_controller.rb
ksk-0.4.6 app/controllers/ksk/navigations_controller.rb
ksk-0.4.5 app/controllers/ksk/navigations_controller.rb
ksk-0.4.4 app/controllers/ksk/navigations_controller.rb
ksk-0.4.3 app/controllers/ksk/navigations_controller.rb
ksk-0.4.2 app/controllers/ksk/navigations_controller.rb
ksk-0.4.1 app/controllers/ksk/navigations_controller.rb
ksk-0.4.0 app/controllers/ksk/navigations_controller.rb
ksk-0.3.4 app/controllers/ksk/navigations_controller.rb
ksk-0.3.3 app/controllers/ksk/navigations_controller.rb
ksk-0.3.2 app/controllers/ksk/navigations_controller.rb
ksk-0.3.0 app/controllers/ksk/navigations_controller.rb
ksk-0.2.15 app/controllers/ksk/navigations_controller.rb
ksk-0.2.14 app/controllers/ksk/navigations_controller.rb
ksk-0.2.13 app/controllers/ksk/navigations_controller.rb
ksk-0.2.12 app/controllers/ksk/navigations_controller.rb
ksk-0.2.11 app/controllers/ksk/navigations_controller.rb
ksk-0.2.10 app/controllers/ksk/navigations_controller.rb
ksk-0.2.9 app/controllers/ksk/navigations_controller.rb
ksk-0.2.8 app/controllers/ksk/navigations_controller.rb