Files
nairobi/app/controllers/admin/geozones_controller.rb
Alberto Miedes Garcés 6175990533 Admin geozones: index, create
Modified Geozone factory and seeds to be more complete
2016-12-04 21:19:36 +01:00

29 lines
425 B
Ruby

class Admin::GeozonesController < ApplicationController
respond_to :html
load_and_authorize_resource
def index
end
def new
end
def create
@geozone = Geozone.new(geozone_params)
if @geozone.save
redirect_to admin_geozones_path
else
render :new
end
end
private
def geozone_params
params.require(:geozone).permit(:name, :external_code, :census_code)
end
end