For the <filter-menu> example in the Agility tutorial, the following
code is used to add the filter menu to the Project show page, to
filter stories by their status:
<prepend-header:>
<div class="filter">
Display by status: <filter-menu param-name="status"
options="&StoryStatus.all"/>
</div>
</prepend-header:>
These statuses are contained in the model StoryStatus. However,
previously the story statuses were stored in the story model as ...
status enum_string(:new, :accepted, :discussion, :implementation)
My question to the group is, how do I modify the <filter-menu> tag
above to make use of the status field in the story model, versus
&StoryStatus.all ?
I've tried changing the following with no success:
options="&Story.status" ----> fails, NoMethodError
options="&Story.status.all" ----> fails, NoMethodError
options="&Story.all" ---> succeeds, but the filter list is the entire
list of stories -- not what I wanted obviously
--
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.