how to call a function in model and pass values in

Maybe it would be better if you explain what you are trying to accomplish.

The method before_save() gets called by the Rails system, which is not going to pass in any arguments. It doesn't work quite like before or after filters in controllers. I suppose you can do just about anything you want inside a before_save() method (within reason and possibly some constraints).

before_save :tst => :title, :content

A before_save would look more like this:

def before_save   # do what you want here end