Forum: Ruby on Rails what does option_tags = nil mean?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7a666449acc7e18a7002bc88798a44d3?d=identicon&s=25 Pingu Penguin (pingu)
on 2007-04-28 12:17
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
6805b35d0a8ea3ede0a7da2d4cf5ae77?d=identicon&s=25 Jonathan Weiss (Guest)
on 2007-04-28 12:36
(Received via mailing list)
Pingu Penguin 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 Weiss
http://blog.innerewut.de
7a666449acc7e18a7002bc88798a44d3?d=identicon&s=25 Pingu Penguin (pingu)
on 2007-04-28 13:04
Many thanks.
This topic is locked and can not be replied to.