What does option_tags = nil mean?


#1

Hi, in the context of:

select_tag(name, option_tags = nil, options = {})

what does option_tags = nil mean?, specifically setting it to nil, does
it men its optional?
Thanks


#2

Pingu P. wrote:

Hi, in the context of:

select_tag(name, option_tags = nil, options = {})

what does option_tags = nil mean?, specifically setting it to nil, does
it men its optional?

Yes, it sets the default value of option_tags to nil, meaning if the
user of the function does not provide a second and third argument, the
values of option_tags is nil and the value of options is an empty hash.

Jonathan


Jonathan W.
http://blog.innerewut.de


#3

Many thanks.