app/controllers/positions_controller.rb
# target location to create(as its prev, succ or child), update, delete or move to(as its prev, succ or child)
target location to create(as its prev, succ or child), update, delete or move to(as its prev, succ or child)
target location to create ( as its prev succ or child ) update delete or move to ( as its prev succ or child )
def find_target_node
    fullname = @fullname
    mark = ''
    if fullname.end_with?(Position::With_Singular_Leaf)
      mark = Position::With_Singular_Leaf
    elsif fullname.end_with?(Position::Without_Singular_Leaf)
      mark = Position::Without_Singular_Leaf
    end
    fullname.gsub!(/#{mark}/, '')
    @position = Position.find :first, :scope => :self, :conditions => {:fullname => fullname}
  end
def find_target_node fullname = @fullname mark = '' if fullname . end_with? ( Position :: With_Singular_Leaf ) mark = Position :: With_Singular_Leaf elsif fullname . end_with? ( Position :: Without_Singular_Leaf ) mark = Position :: Without_Singular_Leaf end fullname . gsub! ( / #{ mark } / , '' ) @position = Position . find :first , :scope => :self , :conditions => { :fullname => fullname } end
target location to create(as its prev, succ or child), update, delete or move to(as its prev, succ or child)
target location to create ( as its prev succ or child ) update delete or move to ( as its prev succ or child )