def update
      @banner = Banner.find(params[:id])
  
      respond_to do |format|
        if @banner.update(banner_params)
          format.html { redirect_to @banner, :notice => 'Banner was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render :action => "edit" }
          format.json { render :json => @banner.errors, :status => :unprocessable_entity }
        end
      end
    end
def update
      @banner = Banner.find(params[:id])
  
      respond_to do |format|
        if @banner.update(banner_params)
          format.html { redirect_to @banner, :notice => 'Banner was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render :action => "edit" }
          format.json { render :json => @banner.errors, :status => :unprocessable_entity }
        end
      end
    end
PUT /banners/1
 PUT /banners/1.json