| Class | PromptAlgorithmsController |
| In: |
app/controllers/prompt_algorithms_controller.rb
|
| Parent: | ApplicationController |
POST /prompt_algorithms POST /prompt_algorithms.xml
# File app/controllers/prompt_algorithms_controller.rb, line 45
45: def create
46: @prompt_algorithm = PromptAlgorithm.new(params[:prompt_algorithm])
47:
48: respond_to do |format|
49: if @prompt_algorithm.save
50: flash[:notice] = 'PromptAlgorithm was successfully created.'
51: format.html { redirect_to(@prompt_algorithm) }
52: format.xml { render :xml => @prompt_algorithm, :status => :created, :location => @prompt_algorithm }
53: else
54: format.html { render :action => "new" }
55: format.xml { render :xml => @prompt_algorithm.errors, :status => :unprocessable_entity }
56: end
57: end
58: end
DELETE /prompt_algorithms/1 DELETE /prompt_algorithms/1.xml
# File app/controllers/prompt_algorithms_controller.rb, line 79
79: def destroy
80: @prompt_algorithm = PromptAlgorithm.find(params[:id])
81: @prompt_algorithm.destroy
82:
83: respond_to do |format|
84: format.html { redirect_to(prompt_algorithms_url) }
85: format.xml { head :ok }
86: end
87: end
GET /prompt_algorithms/1/edit
# File app/controllers/prompt_algorithms_controller.rb, line 39
39: def edit
40: @prompt_algorithm = PromptAlgorithm.find(params[:id])
41: end
GET /prompt_algorithms GET /prompt_algorithms.xml
# File app/controllers/prompt_algorithms_controller.rb, line 7
7: def index
8: @prompt_algorithms = PromptAlgorithm.find(:all)
9:
10: respond_to do |format|
11: format.html # index.html.erb
12: format.xml { render :xml => @prompt_algorithms }
13: end
14: end
GET /prompt_algorithms/list
# File app/controllers/prompt_algorithms_controller.rb, line 90
90: def list
91: @algorithms = PromptAlgorithm.all
92: end
GET /prompt_algorithms/new GET /prompt_algorithms/new.xml
# File app/controllers/prompt_algorithms_controller.rb, line 29
29: def new
30: @prompt_algorithm = PromptAlgorithm.new
31:
32: respond_to do |format|
33: format.html # new.html.erb
34: format.xml { render :xml => @prompt_algorithm }
35: end
36: end
GET /prompt_algorithms/1 GET /prompt_algorithms/1.xml
# File app/controllers/prompt_algorithms_controller.rb, line 18
18: def show
19: @prompt_algorithm = PromptAlgorithm.find(params[:id])
20:
21: respond_to do |format|
22: format.html # show.html.erb
23: format.xml { render :xml => @prompt_algorithm }
24: end
25: end
PUT /prompt_algorithms/1 PUT /prompt_algorithms/1.xml
# File app/controllers/prompt_algorithms_controller.rb, line 62
62: def update
63: @prompt_algorithm = PromptAlgorithm.find(params[:id])
64:
65: respond_to do |format|
66: if @prompt_algorithm.update_attributes(params[:prompt_algorithm])
67: flash[:notice] = 'PromptAlgorithm was successfully updated.'
68: format.html { redirect_to(@prompt_algorithm) }
69: format.xml { head :ok }
70: else
71: format.html { render :action => "edit" }
72: format.xml { render :xml => @prompt_algorithm.errors, :status => :unprocessable_entity }
73: end
74: end
75: end