filter-menu is based on select-menu which always generates a single
<select> -- it doesn't use polymorphic inputs. Such a tag would
probably be useful, and not too hard to write using the filter-menu
source as an example. In your case, you'd need an explicit submit
button since date inputs have more than one input. filter-menu itself
using a small snippet of code in hobo-rapid.js to auto-submit.
apply_scopes does appear to be missing documentation, other than a
mention in the agility tutorial. Please raise a bug so we don't forget
to add it.
Bryan
On 10-05-30 09:36 AM, Togg wrote:
Still no glue here. Can I even use<filter-menu> to filter a date/
datetime field or do I have to rewrite some tag?
I just need a quick pointer were to look at - is there some example
somewhere for date filtering with table-plus?
Thanks,
Sebastian
On 29 Mai, 18:17, Togg<[email protected]> wrote:
Hi all,
I have a field birthday_at in my model and want to add a filter to my
table-plus to allow selection of a range.
Tried to add
hobo_index Person.apply_scopes(:search =>
[params[:search], :first_name, :last_name],
:order_by =>
parse_sort_param(*standard_fields(model)),
:birthday_between =>
[params[:start],params[:end]])
to my controller as hobo_index action and
<div class="filter">
Filter by
Birthday Between:<filter-menu param-name="start"
options="#{10.years.ago}" />
And:<filter-menu param-name="end" options="#{Time.now}" />
</div>
to the index.dryml for this model.
The filter is displayed as a simple selection box with only "All"
available...
How can I get the date selector field automatically be added?
Best regards,
Sebastian
P.S. I tried to find documentation for apply_scopes, but
athttp://cookbook.hobocentral.net/manual/scopesI couldnt find it.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.