Add section elements

This commit is contained in:
2015-03-01 12:57:20 +01:00
parent 832f80e20e
commit 275b4524bc
62 changed files with 10388 additions and 124 deletions
@@ -0,0 +1,42 @@
# 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