def admin_add
      return if !user_is_allowed('products', 'add')
      
      resp = Caboose::StdClass.new(
        :error => nil,
        :redirect => nil
      )
      
      title = params[:title]
      
      if title.length == 0
        resp.error = "The title cannot be empty."
      else
        p = Product.new(:title => title)
        p.save
        resp.redirect = "/admin/products/#{p.id}/general"
      end
      render :json => resp    
    end
def admin_add
      return if !user_is_allowed('products', 'add')
      
      resp = Caboose::StdClass.new(
        :error => nil,
        :redirect => nil
      )
      
      title = params[:title]
      
      if title.length == 0
        resp.error = "The title cannot be empty."
      else
        p = Product.new(:title => title)
        p.save
        resp.redirect = "/admin/products/#{p.id}/general"
      end
      render :json => resp    
    end
POST /admin/products