Using gem ancestry.
How skip self element from Category::ActiveRecordRelation or need use scope?
= simple_form_for @category do |f|
= f.input :parent_id, collection: Category.roots
Something like:
= f.input :parent_id, collection: Category.roots.except(@category)
or via a scope
category.rb
then