Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preferred method of storing path string in db? #358

Open
beamercola opened this issue Feb 10, 2020 · 0 comments
Open

Preferred method of storing path string in db? #358

beamercola opened this issue Feb 10, 2020 · 0 comments

Comments

@beamercola
Copy link

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 beamercola changed the title Preferred method of storing path in db? Preferred method of storing path string in db? Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant