alchemy_cms

https://github.com/magiclabs/alchemy_cms

Ruby

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

Alchemy::PagesController#index

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

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

Loads the current language root page. The current language is either loaded via :locale
parameter or, if that's missing, the default language is used.

If this page is not published then it loads 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-index-for-pr


# Commit to git

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


# 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-index-for-pr

hub pull-request


# Celebrate!