acts_as_nested_set order_column: :position
has_closure_tree order: ‘position'
has_closure_tree order: ‘position’, numeric_ordering: false
SELECT GET_LOCK('13f4ebad71bf21124eb4ea01bab767c17', 0) AS tc4694821d4ce609e0c9ab5203b847cbd
and can’t do anything after that
I have a rails application that makes a connection to a different database. The
basic setup is something like:
# Bar Service class Category establish_connection(:foo_service) has_closure_tree order: "name" end
Fetching records in Bar Service works fine-- I can walk the tree via the relational
hierarchy. However, when I try to create an object it fails with:
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "category_hierarchies" does not exist
I can see that
category_hierarchies is not an available table in bar service
(as we haven't run the migrations there, and are hoping not to do so). Does
anyone here know of a clean way to connect the closure tree to a separate db--?