1: def create 2: @sticky = Sticky.new(params[:sticky]) 3: 4: respond_to do |format| 5: if @sticky.save 6: flash[:notice] = 'Sticky was successfully created.' 7: format.html { redirect_to sticky_url(@sticky) } 8: format.xml { head :created, :location => sticky_url(@sticky) } 9: else 10: format.html { render :action => "new" } 11: format.xml { render :xml => @sticky.errors.to_xml } 12: end 13: end 14: end