class ContentAssignmentsController < ApplicationController # GET /content_assignments # GET /content_assignments.xml # GET /content_assignments.fxml def index @content_assignments = ContentAssignment.find(:all) respond_to do |format| format.html # index.html.erb format.xml { render :xml => @content_assignments } format.fxml { render :fxml => @content_assignments } end end # GET /content_assignments/1 # GET /content_assignments/1.xml # GET /content_assignments/1.fxml def show @content_assignment = ContentAssignment.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @content_assignment } format.fxml { render :fxml => @content_assignment } end end # GET /content_assignments/new # GET /content_assignments/new.xml def new @content_assignment = ContentAssignment.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @content_assignment } end end # GET /content_assignments/1/edit def edit @content_assignment = ContentAssignment.find(params[:id]) end # POST /content_assignments # POST /content_assignments.xml # POST /content_assignments.fxml def create @content_assignment = ContentAssignment.new(params[:content_assignment]) respond_to do |format| if @content_assignment.save flash[:notice] = 'ContentAssignment was successfully created.' format.html { redirect_to(@content_assignment) } format.xml { render :xml => @content_assignment, :status => :created, :location => @content_assignment } format.fxml { render :fxml => @content_assignment } else format.html { render :action => "new" } format.xml { render :xml => @content_assignment.errors, :status => :unprocessable_entity } format.fxml { render :fxml => @content_assignment.errors } end end end # PUT /content_assignments/1 # PUT /content_assignments/1.xml # PUT /content_assignments/1.fxml def update @content_assignment = ContentAssignment.find(params[:id]) respond_to do |format| if @content_assignment.update_attributes(params[:content_assignment]) flash[:notice] = 'ContentAssignment was successfully updated.' format.html { redirect_to(@content_assignment) } format.xml { head :ok } format.fxml { render :fxml => @content_assignment } else format.html { render :action => "edit" } format.xml { render :xml => @content_assignment.errors, :status => :unprocessable_entity } format.fxml { render :fxml => @content_assignment.errors } end end end # DELETE /content_assignments/1 # DELETE /content_assignments/1.xml # DELETE /content_assignments/1.fxml def destroy @content_assignment = ContentAssignment.find(params[:id]) @content_assignment.destroy respond_to do |format| format.html { redirect_to(content_assignments_url) } format.xml { head :ok } format.fxml { render :fxml => @content_assignment } end end end