Skip to content

Preferred method of storing path string in db? #358

Open
@beamercola

Description

@beamercola

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions