Adding :conditions to has_many relationship causes aside to vanish
Reported by Chuck Benedict | June 28th, 2010 @ 11:07 PM | in Hobo 1.3 (Rails 3)
I am using hobo 1.0.1.
I have the following declared in a model called 'Client':
has_many :applied_categories,
:through => :client_categories,
:accessible => true,
:class_name => 'Category',
:conditions => ['categories.parent_id is null'],
:after_add => :add_global_deliverables_for_category
I have the following declared in the client_hints.rb file:
children :client_deliverables, :applied_categories
With the :conditions parameter on the has_many definition, my applied_categories side bar disappears. When I remove it, it reappears. I have confirmed via the console for my test that with the condition present, I still have a row present in the associated collection.
When I look at the generated pages.dryml code, I can see that within the aside tags for the page, the collection definition is missing when the :conditions parameter is present.
Comments and changes to this ticket
-
Matt Jones September 14th, 2011 @ 10:50 PM
- State changed from new to open
- Milestone set to Hobo 1.3 (Rails 3)
- Milestone order changed from 197844 to 0
-
Matt Jones September 21st, 2011 @ 08:40 PM
(from [23893f552b405f96d90a7850bbd58006bcbf395b]) [#747] show non-reversible reflections in aside https://github.com/tablatom/hobo/commit/23893f552b405f96d90a7850bbd...
-
Matt Jones September 21st, 2011 @ 08:41 PM
- State changed from open to resolved
I've changed the code to accept this - note that it's still not possible to get a
collection-preview
tag for this situation.
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 »