Class: EffortLogLineItemsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- EffortLogLineItemsController
- Defined in:
- app/controllers/effort_log_line_items_controller.rb
Overview
Todo: consider removing this controller entirely.….
Instance Method Summary collapse
-
#create ⇒ Object
POST /effort_log_line_items POST /effort_log_line_items.xml.
-
#destroy ⇒ Object
DELETE /effort_log_line_items/1 DELETE /effort_log_line_items/1.xml.
-
#edit ⇒ Object
GET /effort_log_line_items/1/edit.
- #index ⇒ Object
-
#new ⇒ Object
GET /effort_log_line_items/new GET /effort_log_line_items/new.xml.
-
#show ⇒ Object
GET /effort_log_line_items/1 GET /effort_log_line_items/1.xml.
-
#update ⇒ Object
PUT /effort_log_line_items/1 PUT /effort_log_line_items/1.xml.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
POST /effort_log_line_items POST /effort_log_line_items.xml
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'app/controllers/effort_log_line_items_controller.rb', line 52 def create @effort_log_line_item = EffortLogLineItem.new(params[:effort_log_line_item]) respond_to do |format| if @effort_log_line_item.save flash[:notice] = 'EffortLogLineItem was successfully created.' format.html { redirect_to(@effort_log_line_item) } format.xml { render :xml => @effort_log_line_item, :status => :created, :location => @effort_log_line_item } else format.html { render :action => "new" } format.xml { render :xml => @effort_log_line_item.errors, :status => :unprocessable_entity } end end end |
#destroy ⇒ Object
DELETE /effort_log_line_items/1 DELETE /effort_log_line_items/1.xml
86 87 88 89 90 91 92 93 94 |
# File 'app/controllers/effort_log_line_items_controller.rb', line 86 def destroy @effort_log_line_item = EffortLogLineItem.find(params[:id]) @effort_log_line_item.destroy respond_to do |format| format.html { redirect_to(effort_log_line_items_url) } format.xml { head :ok } end end |
#edit ⇒ Object
GET /effort_log_line_items/1/edit
45 46 47 48 |
# File 'app/controllers/effort_log_line_items_controller.rb', line 45 def edit @effort_log_line_item = EffortLogLineItem.find(params[:id]) end |
#index ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/effort_log_line_items_controller.rb', line 13 def index @effort_log_line_items = EffortLogLineItem.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @effort_log_line_items } end end |
#new ⇒ Object
GET /effort_log_line_items/new GET /effort_log_line_items/new.xml
35 36 37 38 39 40 41 42 |
# File 'app/controllers/effort_log_line_items_controller.rb', line 35 def new @effort_log_line_item = EffortLogLineItem.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @effort_log_line_item } end end |
#show ⇒ Object
GET /effort_log_line_items/1 GET /effort_log_line_items/1.xml
24 25 26 27 28 29 30 31 |
# File 'app/controllers/effort_log_line_items_controller.rb', line 24 def show @effort_log_line_item = EffortLogLineItem.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @effort_log_line_item } end end |
#update ⇒ Object
PUT /effort_log_line_items/1 PUT /effort_log_line_items/1.xml
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'app/controllers/effort_log_line_items_controller.rb', line 69 def update @effort_log_line_item = EffortLogLineItem.find(params[:id]) respond_to do |format| if @effort_log_line_item.update_attributes(params[:effort_log_line_item]) flash[:notice] = 'EffortLogLineItem was successfully updated.' format.html { redirect_to(@effort_log_line_item) } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @effort_log_line_item.errors, :status => :unprocessable_entity } end end end |