How to pass optional parameter?

Hi All,
I have one method like def hello(int,string)
Now i want that if user pass int value or string value then it should
search on the basis of one of those.

means i want both as optional parameter.
Please tell me how to do this in ROR.

To make a parameter optional, it must have a default value.

def search(numeric_value = 0, textual_value = “”)



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs