Class: Ksk::NavigationsController
- Inherits:
-
Bhf::ApplicationController
- Object
- Bhf::ApplicationController
- Ksk::NavigationsController
- Defined in:
- app/controllers/ksk/navigations_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/controllers/ksk/navigations_controller.rb', line 9 def create = Navigation.new() if .save render json: {id: .id} else render status: 400, json: .errors end end |
#sort ⇒ Object
3 4 5 6 7 |
# File 'app/controllers/ksk/navigations_controller.rb', line 3 def sort Navigation.sort_items(params[:navigation]) Navigation.find(params[:id]).update_attribute(:parent_id, params[:parent_id]) head :ok end |