state_machine

https://github.com/pluginaweek/state_machine

Ruby

Adds support for creating state machines for attributes on any Ruby class

Gitlab::SQL::RecursiveCTE#alias_to

Returns an "AS" statement that aliases the CTE name as the given table
name. This allows one to trick ActiveRecord into thinking it's selecting
from an actual table, when in reality it's selecting from a CTE.

alias_table - The Arel table to use as the alias.

Source | Google | Stack overflow

Edit

git clone [email protected]:pluginaweek/state_machine.git

cd state_machine

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Gitlab--SQL--RecursiveCTE-alias_to-for-pr


# Commit to git

git add git commit -m "better docs for Gitlab::SQL::RecursiveCTE#alias_to"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Gitlab--SQL--RecursiveCTE-alias_to-for-pr

hub pull-request


# Celebrate!