blob: 595a20d6899c0e81d207252d34c18f993e4dbe51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
class RouteElementsController < ApplicationController
def index
@route_elements = RouteElement.all
end
def show
@route_element = RouteElement.find(params[:id])
end
def new
@route_element = RouteElement.new
end
def create
@route_element = RouteElement.new(params[:route_element])
if @route_element.save
redirect_to @route_element, :notice => t('route_elements.controller.successfuly_created')
else
render :new
end
end
def edit
@route_element = RouteElement.find(params[:id])
end
def update
@route_element = RouteElement.find(params[:id])
if @route_element.update_attributes(params[:route_element])
redirect_to @route_element, :notice => t('route_elements.controller.successfuly_updated')
else
render :edit
end
end
def destroy
@route_element = RouteElement.find(params[:id])
@route_element.destroy
redirect_to route_elements_url, :notice => t('route_elements.controller.successfuly_destroyed')
end
end
|