closure_tree icon indicating copy to clipboard operation
closure_tree copied to clipboard

Preferred method of storing path string in db?

Open beamercola opened this issue 5 years ago • 0 comments

I include path in the json, so I'm storing it as a string in the db. Is there a preferred method for doing this? Right now I'm doing:

  after_commit :cache_path, on: [:create]

  def cache_path
    self.path = ancestry_path.join("/")
    self.save
  end

thanks

beamercola avatar Feb 10 '20 18:02 beamercola