Commit 297f1669 authored by Kushal Pandya's avatar Kushal Pandya

Add route for `/admin/geo_nodes/new`

parent a1f76904
......@@ -127,7 +127,7 @@ namespace :admin do
get :download, on: :member
end
resources :geo_nodes, only: [:index, :create, :edit, :update, :destroy] do
resources :geo_nodes, only: [:index, :create, :new, :edit, :update, :destroy] do
member do
post :repair
post :toggle
......
......@@ -22,10 +22,14 @@ class Admin::GeoNodesController < Admin::ApplicationController
else
@nodes = GeoNode.all
render :index
render :new
end
end
def new
@node = GeoNode.new
end
def update
if Geo::NodeUpdateService.new(@node, geo_node_params).execute
redirect_to admin_geo_nodes_path, notice: 'Node was successfully updated.'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment