What does option_tags = nil mean?

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

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

Many thanks.

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