| URL | HTTP Verb | Action |
|---|---|---|
| /photos/ | GET | index |
| /photos/new | GET | new |
| /photos | POST | create |
| /photos/:id | GET | show |
| /photos/:id/edit | GET | edit |
| /photos/:id | PATCH/PUT | update |
| /photos/:id | DELETE | destroy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sudo apt-get install wget | |
| $ sudo apt-get install build-essential | |
| $ sudo apt-get install libc6-dev | |
| $ wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.27.tar.gz | |
| $ tar -xzf freetds-1.00.27.tar.gz | |
| $ cd freetds-1.00.27 | |
| $ ./configure --prefix=/usr/local --with-tdsver=7.3 | |
| $ make | |
| $ make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dbms.mode=CORE | |
| dbms.connector.bolt.listen_address=:7691 | |
| dbms.connector.http.listen_address=:7481 | |
| dbms.connector.https.listen_address=:7371 | |
| causal_clustering.initial_discovery_members=localhost:5001,localhost:5002,localhost:5003 | |
| causal_clustering.discovery_listen_address=127.0.0.1:5001 | |
| causal_clustering.transaction_listen_address=:6001 | |
| causal_clustering.raft_listen_address=:7001 |
Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.
You can get all of this information on the command line.
rails generate with no generator name will output a list of all available generators and some information about global options.
rails generate GENERATOR --help will list the options that can be passed to the specified generator.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # app/workers/active_admin_export_worker.rb | |
| class ActiveAdminExportWorker | |
| include Sidekiq::Worker | |
| sidekiq_options queue: 'high' | |
| def perform(options = {}) | |
| model = options[:model_name].classify.constantize | |
| path = "#{Rails.root.to_s}/tmp/#{filename(options[:name])}" | |
| columns = model.send(:column_names) |
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ - command line values (for example, -u my_user, these are not variables)
- role defaults (defined in role/defaults/main.yml)
- inventory file or script group vars
- inventory group_vars/all
From this tutorial.
Gemfile.rb:
- Rspec-rails to development and test groups
group :development, :test do
gem 'rspec-rails', '~> 3.5'OlderNewer