filter-menu control not displaying last selected filter
Reported by David H | October 26th, 2008 @ 02:08 AM
I'm trying to build an index page with filterable, sortable table. In animals_controller.rb I have:
class AnimalsController < ApplicationController
hobo_model_controller
auto_actions :all
def index
hobo_index Animal.apply_scopes(
:search => [params[:search], :name],
:order_by => parse_sort_param(:name, :species, :breed),
:breed_is => params[:breedfilter])
end
end
In animals/index.dryml I have:
<index-page>
<collection: replace>
<div>
<table-plus fields="this, species, breed">
<prepend-header:>
<div class="filter">
Breed: <filter-menu param-name="breedfilter" options="&Breed.all"/>
</div>
</prepend-header:>
<empty-message:>No animals match your criteria</empty-message:>
</table-plus>
</div>
</collection:>
</index-page>
In animal.rb I have "belongs_to :breed", and the breed model has a name, etc.
When the filter is set to a particular species, the data in the table changes correctly, but the filter menu reads "All" instead of the chosen species. Picking a different breed has the same effect. Picking "All" does nothing, i.e. does not remove the filter condition.
I've been playing around with this a little more, and if I select a new filter from the control and then quickly select All before the page updates (easy to do in debug mode), then the All option will work. When this happens I see this message in the console: "ERROR Errno::ECONNABORTED: An established connection was aborted by the software in your host machine."
Comments and changes to this ticket
-
Tom Locke December 1st, 2008 @ 05:57 PM
- State changed from new to resolved
This is working fine for me. Please re-open if you still have the problem with the latest Hobo
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
- Nobody is watching this ticket.