def create
      @clip = Clip.new
      begin
        @clip = Clip.new(params[:clip])
      rescue ActiveModel::MassAssignmentSecurity::Error => error
        @clip.errors.add("Security -",error.message)
      end
      
      respond_to do |format|
        if @clip.errors.empty? && @clip.valid? && @clip.save
          format.html { redirect_to @clip }
          format.json { render json: @clip, status: :created, location: @post }
          format.xml { render xml: @clip, status: :created, location: @post }
        else# didn't pass validation
          format.html { render :new }
          format.json { render json: @clip.errors, status: :unprocessable_entity }
          format.xml { render xml: @clip.errors, status: :unprocessable_entity }
        end
      end
    end
def create
      @clip = Clip.new
      begin
        @clip = Clip.new(params[:clip])
      rescue ActiveModel::MassAssignmentSecurity::Error => error
        @clip.errors.add("Security -",error.message)
      end
      
      respond_to do |format|
        if @clip.errors.empty? && @clip.valid? && @clip.save
          format.html { redirect_to @clip }
          format.json { render json: @clip, status: :created, location: @post }
          format.xml { render xml: @clip, status: :created, location: @post }
        else# didn't pass validation
          format.html { render :new }
          format.json { render json: @clip.errors, status: :unprocessable_entity }
          format.xml { render xml: @clip.errors, status: :unprocessable_entity }
        end
      end
    end
POST /create
 POST /create.json
 POST /create.xml