Files
mozo-backend/app/controllers/admin/svg_elements_controller.rb
T
2015-03-01 12:57:20 +01:00

43 lines
640 B
Ruby

# encoding: UTF-8
module Admin
class SvgElementsController < Admin::ApplicationController
def index
@svg_elements = SvgElement.all
end
def new
end
def create
if @svg_element.save
redirect_to [:edit, :admin, @svg_element]
else
render 'new'
end
end
def update
if @svg_element.update_attributes svg_element_params
redirect_to [:edit, :admin, @svg_element]
else
render 'edit'
end
end
def show
end
def edit
end
private
def svg_element_params
params.require(:svg_element).permit!
end
end
end