class Services::SiteDetailsController < ServicesController # GET /site_details # GET /site_details.xml def index @site_details = SiteDetail.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @site_details } end end # GET /site_details/1 # GET /site_details/1.xml def show @site_detail = SiteDetail.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @site_detail } end end # GET /site_details/new # GET /site_details/new.xml def new @site_detail = SiteDetail.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @site_detail } end end # GET /site_details/1/edit def edit @site_detail = SiteDetail.find(params[:id]) end # POST /site_details # POST /site_details.xml def create @site_detail = SiteDetail.new(params[:site_detail]) respond_to do |format| if @site_detail.save format.html { redirect_to([:services, @site_detail], :notice => 'Site detail was successfully created.') } format.xml { render :xml => @site_detail, :status => :created, :location => [:services, @site_detail] } else format.html { render :action => "new" } format.xml { render :xml => @site_detail.errors, :status => :unprocessable_entity } end end end # PUT /site_details/1 # PUT /site_details/1.xml def update @site_detail = SiteDetail.find(params[:id]) respond_to do |format| if @site_detail.update_attributes(params[:site_detail]) format.html { redirect_to([:services, @site_detail], :notice => 'Site detail was successfully updated.') } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @site_detail.errors, :status => :unprocessable_entity } end end end # DELETE /site_details/1 # DELETE /site_details/1.xml def destroy @site_detail = SiteDetail.find(params[:id]) @site_detail.destroy respond_to do |format| format.html { redirect_to(services_site_details_url) } format.xml { head :ok } end end end