Class: Services::SiteSignupsController

Inherits:
ServicesController
  • Object
show all
Defined in:
app/controllers/services/site_signups_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

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
   = SiteSignup.new(params[:site_signup])

  respond_to do |format|
    if .save
      format.html { redirect_to([:services, ], :notice => 'Site signup was successfully created.') }
      format.xml  { render :xml => , :status => :created, :location => [:services, ] }
    else
      format.html { render :action => "new" }
      format.xml  { render :xml => .errors, :status => :unprocessable_entity }
    end
  end
end

#destroyObject

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
   = SiteSignup.find(params[:id])
  .destroy

  respond_to do |format|
    format.html { redirect_to(services_site_signups_url) }
    format.xml  { head :ok }
  end
end

#editObject

GET /site_signups/1/edit



36
37
38
# File 'app/controllers/services/site_signups_controller.rb', line 36

def edit
   = SiteSignup.find(params[:id])
end

#indexObject

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

#newObject

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
   = SiteSignup.new

  respond_to do |format|
    format.html # new.html.erb
    format.xml  { render :xml =>  }
  end
end

#showObject

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
   = SiteSignup.find(params[:id])

  respond_to do |format|
    format.html # show.html.erb
    format.xml  { render :xml =>  }
  end
end

#updateObject

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
   = SiteSignup.find(params[:id])

  respond_to do |format|
    if .update_attributes(params[:site_signup])
      format.html { redirect_to([:services, ], :notice => 'Site signup was successfully updated.') }
      format.xml  { head :ok }
    else
      format.html { render :action => "edit" }
      format.xml  { render :xml => .errors, :status => :unprocessable_entity }
    end
  end
end