Sha256: 08687455743a0759624843db3a7cd4791e4970307cbd73da6c4f7891a17580b6

Contents?: true

Size: 528 Bytes

Versions: 5

Compression:

Stored size: 528 Bytes

Contents

class QwertyAdmin::NodesController < QwertyAdmin::BaseController
  def index
    @root_node = Sitemap.root
  end

  def new
    @node = build_resource
    @node.parent_id = params[:parent_id]
  end
  
  def create
    create! { default_redirect }
  end

  def update
    update! { default_redirect }
  end

  def up
    resource.move_higher
    redirect_to default_redirect
  end

  def down
    resource.move_lower
    redirect_to default_redirect
  end

  private

  def default_redirect
    qwerty_admin_nodes_path
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
qwerty-0.0.7.pre app/controllers/qwerty_admin/nodes_controller.rb
qwerty-0.0.5.pre app/controllers/qwerty_admin/nodes_controller.rb
qwerty-0.0.4.pre app/controllers/qwerty_admin/nodes_controller.rb
qwerty-0.0.3.pre app/controllers/qwerty_admin/nodes_controller.rb
qwerty-0.0.1.pre app/controllers/qwerty_admin/nodes_controller.rb