Class: Services::SiteSignupsController
- Inherits:
-
ServicesController
- Object
- ServicesController
- Services::SiteSignupsController
- Defined in:
- app/controllers/services/site_signups_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /site_signups POST /site_signups.xml.
-
#destroy ⇒ Object
DELETE /site_signups/1 DELETE /site_signups/1.xml.
-
#edit ⇒ Object
GET /site_signups/1/edit.
-
#index ⇒ Object
GET /site_signups GET /site_signups.xml.
-
#new ⇒ Object
GET /site_signups/new GET /site_signups/new.xml.
-
#show ⇒ Object
GET /site_signups/1 GET /site_signups/1.xml.
-
#update ⇒ Object
PUT /site_signups/1 PUT /site_signups/1.xml.
Instance Method Details
#create ⇒ Object
POST /site_signups POST /site_signups.xml
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'app/controllers/services/site_signups_controller.rb', line 42 def create @site_signup = SiteSignup.new(params[:site_signup]) respond_to do |format| if @site_signup.save format.html { redirect_to([:services, @site_signup], :notice => 'Site signup was successfully created.') } format.xml { render :xml => @site_signup, :status => :created, :location => [:services, @site_signup] } else format.html { render :action => "new" } format.xml { render :xml => @site_signup.errors, :status => :unprocessable_entity } end end end |
#destroy ⇒ Object
DELETE /site_signups/1 DELETE /site_signups/1.xml
74 75 76 77 78 79 80 81 82 |
# File 'app/controllers/services/site_signups_controller.rb', line 74 def destroy @site_signup = SiteSignup.find(params[:id]) @site_signup.destroy respond_to do |format| format.html { redirect_to(services_site_signups_url) } format.xml { head :ok } end end |
#edit ⇒ Object
GET /site_signups/1/edit
36 37 38 |
# File 'app/controllers/services/site_signups_controller.rb', line 36 def edit @site_signup = SiteSignup.find(params[:id]) end |
#index ⇒ Object
GET /site_signups GET /site_signups.xml
4 5 6 7 8 9 10 11 |
# File 'app/controllers/services/site_signups_controller.rb', line 4 def index @site_signups = SiteSignup.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @site_signups } end end |
#new ⇒ Object
GET /site_signups/new GET /site_signups/new.xml
26 27 28 29 30 31 32 33 |
# File 'app/controllers/services/site_signups_controller.rb', line 26 def new @site_signup = SiteSignup.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @site_signup } end end |
#show ⇒ Object
GET /site_signups/1 GET /site_signups/1.xml
15 16 17 18 19 20 21 22 |
# File 'app/controllers/services/site_signups_controller.rb', line 15 def show @site_signup = SiteSignup.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @site_signup } end end |
#update ⇒ Object
PUT /site_signups/1 PUT /site_signups/1.xml
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'app/controllers/services/site_signups_controller.rb', line 58 def update @site_signup = SiteSignup.find(params[:id]) respond_to do |format| if @site_signup.update_attributes(params[:site_signup]) format.html { redirect_to([:services, @site_signup], :notice => 'Site signup was successfully updated.') } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @site_signup.errors, :status => :unprocessable_entity } end end end |