def create
      @image = Cmtool::Image.new(image_params)

      respond_to do |format|
        if @image.save
          format.html { redirect_to([cmtool, @image.directory || @image], :notice => I18n.t('cmtool.action.create.successful', :model => Cmtool::Image.model_name.human) ) }
          format.xml  { render :xml => @image, :status => :created, :location => @image }
        else
          format.html { render :action => "new" }
          format.xml  { render :xml => @image.errors, :status => :unprocessable_entity }
        end
      end
    end
def create
      @image = Cmtool::Image.new(image_params)

      respond_to do |format|
        if @image.save
          format.html { redirect_to([cmtool, @image.directory || @image], :notice => I18n.t('cmtool.action.create.successful', :model => Cmtool::Image.model_name.human) ) }
          format.xml  { render :xml => @image, :status => :created, :location => @image }
        else
          format.html { render :action => "new" }
          format.xml  { render :xml => @image.errors, :status => :unprocessable_entity }
        end
      end
    end
POST /images
 POST /images.xml