rails_admin

https://github.com/railsadminteam/rails_admin

Ruby

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data

Banzai::Filter::RelativeLinkFilter#build_relative_path

Convert a relative path into its correct location based on the currently
requested path

path         - Relative path String
request_path - Currently-requested path String

Examples:

  # File in the same directory as the current path
  build_relative_path("users.md", "doc/api/README.md")
  # => "doc/api/users.md"

  # File in the same directory, which is also the current path
  build_relative_path("users.md", "doc/api")
  # => "doc/api/users.md"

  # Going up one level to a different directory
  build_relative_path("../update/7.14-to-8.0.md", "doc/api/README.md")
  # => "doc/update/7.14-to-8.0.md"

Returns a String

Source | Google | Stack overflow

Edit

git clone [email protected]:railsadminteam/rails_admin.git

cd rails_admin

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Banzai--Filter--RelativeLinkFilter-build_relative_path-for-pr


# Commit to git

git add git commit -m "better docs for Banzai::Filter::RelativeLinkFilter#build_relative_path"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Banzai--Filter--RelativeLinkFilter-build_relative_path-for-pr

hub pull-request


# Celebrate!