noob question:controller-model problem

hi guys, hope u are all out there..

so this is my controller method that creates a new product(and stores
into the db)
def create
    vendor_id = session[:user_id]
    @product =[:product])

    respond_to do |format|
        flash[:notice] = 'Book entry successfully created.'
        format.html { redirect_to(@product) }
        format.xml { render :xml => @product, :status
=> :created, :location => @product }
        format.html { render :action => "new" }
        format.xml { render :xml => @product.errors, :status
=> :unprocessable_entity }

the view : has fields into which the user inserts some values, minus
his id given by the db, froam table users

the model:
class Product < ActiveRecord::Base
    has_many :line_items

    validates_presence_of :title, :description, :image_url
    validates_numericality_of :price
    validates_uniqueness_of :title
    validate :price_must_be_grater_than_zero
    validates_format_of :image_url,
                        :with => %r{\.(gif|jpg|png)$}i,
                        :message => 'must be a URL for GIF, JPG or PNG

     find(:all, :conditions => ['title LIKE ?', "%#{search}%"])

    def self.find_products_for_sale
        find(:all, :order => "title" )

    def self.add_vendor_id(vendor_id)
            self.vendor_id = vendor_id

        def price_must_be_grater_than_zero
            errors.add(:price, 'should be at least $ 0.01') if
price.nil? || price < 0.01

The problem is that rails will not save the products object giving
this error :
NoMethodError in ProductsController#create
undefined method `add_vendor_id' for #<Product:0xb60624ec>

Pls help....

a billion thx in advance,

def ***self.***add_vendor_id means add_vendor_id makes add_vendor_id a
class method, not an instance method as you want it to be.