Class: ProxiesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ProxiesController
- Defined in:
- app/controllers/proxies_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/controllers/proxies_controller.rb', line 15 def create @proxy = Proxy.new(params[:proxy]) if @proxy.save redirect_to(proxies_url, :notice => 'Proxy was successfully created.') else render :action => "new" end end |
#destroy ⇒ Object
33 34 35 36 37 38 |
# File 'app/controllers/proxies_controller.rb', line 33 def destroy @proxy = Proxy.find(params[:id]) @proxy.destroy redirect_to(proxies_url) end |
#edit ⇒ Object
11 12 13 |
# File 'app/controllers/proxies_controller.rb', line 11 def edit @proxy = Proxy.find(params[:id]) end |
#index ⇒ Object
3 4 5 |
# File 'app/controllers/proxies_controller.rb', line 3 def index @proxies = Proxy.all end |
#new ⇒ Object
7 8 9 |
# File 'app/controllers/proxies_controller.rb', line 7 def new @proxy = Proxy.new end |
#update ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'app/controllers/proxies_controller.rb', line 24 def update @proxy = Proxy.find(params[:id]) if @proxy.update_attributes(params[:proxy]) redirect_to(proxies_url, :notice => 'Proxy was successfully updated.') else render :action => "edit" end end |