On 6/16/06, Dave <dave@powertolive.net> wrote:> I''ve been to the RoR api docs trying to find out
> about options for various methods (mostly for
> select helper methods), yet I find no listing of
> options even when the method described says
> that it takes options. How
> can I find out what are valid
> options say for a date_select tag?
Dave,
In many places it''s not obvious, but in the example that you gave
(date_select), a careful reading of the documentation provides the
answer.
<quote>
It''s possible to tailor the selects through the options hash, which
accepts all the keys that each of the individual select builders do
(like :use_month_numbers for select_month) as well as a range of
discard options. The discard options are :discard_year, :discard_month
and :discard_day.
</quote>
Also, notice at the top of the page the following:
<quote>
All of the select-type methods share a number of common options that
are as follows:
* :prefix - overwrites the default prefix of "date" used for the
select names. So specifying "birthday" would give birthday[month]
instead of date[month] if passed to the select_month method.
* :include_blank - set to true if it should be possible to set an
empty date.
* :discard_type - set to true if you want to discard the type part
of the select name. If set to true, the select_month method would use
simply "date" (which can be overwritten using :prefix) instead of
"date[month]".
</quote>
Hope this helps.
Todd
>
> Thanks,
>
> Dave
>