alchemy_cms

https://github.com/magiclabs/alchemy_cms

Ruby

AlchemyCMS is a powerful, flexible and user centric Rails 5 CMS. 🧙🏻‍♂️

Alchemy::PagesController#show

== The show action gets invoked if one requests '/:urlname' or '/:locale/:urlname'

If the locale is the default locale, then it redirects to '/' without the locale.

Loads the page via it's urlname. If more than one language is published the
current language is either loaded via :locale parameter or, if that's missing,
the page language is used and a redirect to the page with prefixed locale happens.

If the requested page is not published then it redirects to the first published
descendant it finds. If no public page can be found it renders a 404 error.

Source | Google | Stack overflow

Edit

git clone [email protected]:magiclabs/alchemy_cms.git

cd alchemy_cms

open app/controllers/alchemy/pages_controller.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Alchemy--PagesController-show-for-pr


# Commit to git

git add app/controllers/alchemy/pages_controller.rbgit commit -m "better docs for Alchemy::PagesController#show"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Alchemy--PagesController-show-for-pr

hub pull-request


# Celebrate!