search for: has_children

Displaying 11 results from an estimated 11 matches for "has_children".

2012 Apr 17
0
Request for adding an "alias"/"as" to ActiveRecord
...9;'Field'' end Okay, first set up is awesome! Now the issue: I''m implementing the tree view in a lazy way using AJAX, so I only need to check for the existence of children. The easy way is to iterate over the fields like this: render json: fields.map {|field| ... has_children: field.children.exists? # Field.has_many :children, class: ''Field'', foreign_key: ''parent_id'' } But this means fields.count "select 1 where exists(...)" queries. This works fine, but I''d prefer to have something like this: field_ids_with_chi...
2017 Nov 20
2
doveadm mailbox list -s Segmentation fault
...03155 in mailbox_list_set_subscription_flags (list=0x801c71848, vname=0x801cfa770 "INBOX", flags=0x801cfa4f0) at mailbox-list-subscriptions.c:188 node = (struct mailbox_node *) 0x7fffffffeb28 #3 0x0000000800dfe624 in mailbox_list_ns_prefix_return (ctx=0x801cfa448, ns=0x801c35460, has_children=false) at mailbox-list-iter.c:473 box = (struct mailbox *) 0x800dfe345 existence = 32767 ret = -6768 #4 0x0000000800dfdeeb in mailbox_list_ns_iter_try_next (_ctx=0x801cfa448, info_r=0x7fffffffe5f0) at mailbox-list-iter.c:583 ctx = (struct ns_list_iterate_context *)...
2017 Nov 20
0
doveadm mailbox list -s Segmentation fault
..._subscription_flags > (list=0x801c71848, vname=0x801cfa770 "INBOX", flags=0x801cfa4f0) at > mailbox-list-subscriptions.c:188 > node = (struct mailbox_node *) 0x7fffffffeb28 > #3 0x0000000800dfe624 in mailbox_list_ns_prefix_return (ctx=0x801cfa448, > ns=0x801c35460, has_children=false) at mailbox-list-iter.c:473 > box = (struct mailbox *) 0x800dfe345 > existence = 32767 > ret = -6768 > #4 0x0000000800dfdeeb in mailbox_list_ns_iter_try_next (_ctx=0x801cfa448, > info_r=0x7fffffffe5f0) at mailbox-list-iter.c:583 > ctx = (stru...
2013 Jun 18
2
Crashes at login time with freshest code
...b in mailbox_list_ns_iter_try_next (_ctx=0x10a10440, info_r=0x7fffffffe768) at mailbox-list-iter.c:580 ctx = 0x10a10440 ns = 0x1050912c <o_stream_get_buffer_used_size+41> info = 0x10a1b808 error = MAIL_ERROR_NONE errstr = 0x10a47840 "" has_children = false __FUNCTION__ = "mailbox_list_ns_iter_try_next" #17 0x00000000105e36fc in mailbox_list_ns_iter_next (_ctx=0x10a10440) at mailbox-list-iter.c:645 info = 0x0 #18 0x00000000105e4394 in mailbox_list_iter_next_call (ctx=0x10a10440) at mailbox-list-iter.c:941 ---Type <...
2006 Feb 24
2
how to better generalize a tree?
first some background info: I have a blog application that has a comments table with the following columns: id parent_id post_id created_at body here''s my model: class Comment < ActiveRecord::Base belongs_to :post acts_as_tree :order => ''created_at'' def print_children (options={}) before = options[:before] ? options[:before]
2007 Jan 08
0
[842] trunk/wxsugar/lib/wx_sugar/wx_classes/treectrl.rb: Fix for TreeItemIds as Integers
...amp;nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-01-08 20:34:42 UTC (rev 842) </span><span class="lines">@@ -10,7 +10,7 @@ </span><span class="cx"> block.call(start_item) </span><span class="cx"> if has_children(start_item) </span><span class="cx"> child, cookie = get_first_child(start_item) </span><del>- while child.is_ok </del><ins>+ while child.nonzero? </ins><span class="cx"> traverse(child, &block) </spa...
2006 Dec 21
0
[793] trunk/wxsugar/lib/wx_sugar/wx_classes/treectrl.rb: Moved traverse method in wxSugar
...y other methods within + # TreeCtrl (for example, get_item_text). + # + # If +start_item+ is not specified, this method will recurse over + # every item within the tree, starting with the root item. + def traverse(start_item = self.get_root_item, &block) + block.call(start_item) + if has_children(start_item) + child, cookie = get_first_child(start_item) + while child.is_ok + traverse(child, &block) + child = get_next_sibling(child) + end + end + end +end </ins></span></pre> </div> </div> </body> </html>
2013 Jun 07
1
v2.2.2 (e5bd0a7c6a1e) Core Dump
...c:173 ctx = <optimized out> ret = 0 #8 0x00007fecd8c0d35b in mailbox_list_ns_iter_try_next (info_r=<synthetic pointer>, _ctx=0x21d9020) at mailbox-list-iter.c:574 ctx = 0x21d9020 info = <optimized out> errstr = <optimized out> has_children = <optimized out> ns = <optimized out> error = 4294967295 #9 mailbox_list_ns_iter_next (_ctx=0x21d9020) at mailbox-list-iter.c:645 info = <optimized out> #10 0x00007fecd8c0bd17 in mailbox_list_iter_next_call (ctx=ctx at entry=0x21d9020) at mailbox-list-ite...
2007 Apr 02
0
[940] trunk/wxsugar/lib/wx_sugar/wx_classes/treectrl.rb: Align #traverse usage with #each in enumerable_controls.rb
...ext(start_item)) + when 3 + block.call(start_item, + get_item_text(start_item), + get_item_data(start_item)) + else + raise ArgumentError, "Invalid number of block parameters" + end + </ins><span class="cx"> if has_children(start_item) </span><span class="cx"> child, cookie = get_first_child(start_item) </span><span class="cx"> while child.nonzero? </span></span></pre> </div> </div> </body> </html>
2017 Nov 20
2
doveadm mailbox list -s Segmentation fault
Hey, I'm getting Segmentation fault when doing "doveadm mailbox list -s -u kristjan.eentsalu". doveadm mailbox list -u kristjan.eentsalu works fine. OS: FreeBSD 11.1-RELEASE-p1 Dovecot 2.2.33.2 , pigenhole 0.4.21 Trace and dovecot -n below GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you
2014 Apr 01
2
imap process and indexer-worker crash while creating folders
...e (list=0xb15df0, patterns=, flags=(MAILBOX_LIST_ITER_RETURN_CHILDREN | MAILBOX_LIST_ITER_RETURN_SPECIALUSE)) at mailbox-list-iter.c:173 ctx = ret = 0 #27 0x00007f0028558179 in mailbox_list_ns_iter_try_next (info_r=, _ctx=0xb269b0) at mailbox-list-iter.c:574 ctx = 0xb269b0 info = errstr = has_children = ns = error = MAIL_ERROR_NONE #28 mailbox_list_ns_iter_next (_ctx=0xb269b0) at mailbox-list-iter.c:645 info = #29 0x00007f0028556baf in mailbox_list_iter_next_call (ctx=ctx at entry=0xb269b0) at mailbox-list-iter.c:941 info = set = #30 0x00007f00285577c4 in mailbox_list_iter_next (ctx=0x...