Class: ProjectInfosController
Instance Method Summary
collapse
#project_info_exists
#footer_menu, #home_page, #page_title
Instance Method Details
#create ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/project_infos_controller.rb', line 17
def create
@project_info = ProjectInfo.new(params[:project_info])
if @project_info.save
flash[:notice] = 'ProjectInfo was successfully created.'
redirect_back_or_default(:controller => 'board', :action => 'index')
else
render :action => 'new'
end
end
|
#edit ⇒ Object
27
28
29
|
# File 'app/controllers/project_infos_controller.rb', line 27
def edit
@project_info = ProjectInfo.find(params[:id])
end
|
#index ⇒ Object
9
10
11
|
# File 'app/controllers/project_infos_controller.rb', line 9
def index
@project_info = ProjectInfo.find(1)
end
|
#new ⇒ Object
13
14
15
|
# File 'app/controllers/project_infos_controller.rb', line 13
def new
@project_info = ProjectInfo.new
end
|
#update ⇒ Object
31
32
33
34
35
36
37
38
39
|
# File 'app/controllers/project_infos_controller.rb', line 31
def update
@project_info = ProjectInfo.find(params[:id])
if @project_info.update_attributes(params[:project_info])
flash[:notice] = 'ProjectInfo was successfully updated.'
redirect_back_or_default(:controller => 'board', :action => 'index')
else
render :action => 'edit'
end
end
|