diff options
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/contributing_to_ruby_on_rails.md | 6 | ||||
-rw-r--r-- | guides/source/generators.md | 2 | ||||
-rw-r--r-- | guides/source/getting_started.md | 2 | ||||
-rw-r--r-- | guides/source/routing.md | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index a8b959c725..0b05725623 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -318,6 +318,12 @@ You can also run any single test separately: $ ARCONN=sqlite3 ruby -Itest test/cases/associations/has_many_associations_test.rb ``` +To run a single test against all adapters, use: + +```bash +$ bundle exec rake TEST=test/cases/associations/has_many_associations_test.rb +``` + You can invoke `test_jdbcmysql`, `test_jdbcsqlite3` or `test_jdbcpostgresql` also. See the file `activerecord/RUNNING_UNIT_TESTS.rdoc` for information on running more targeted database tests, or the file `ci/travis.rb` for the test suite run by the continuous integration server. ### Warnings diff --git a/guides/source/generators.md b/guides/source/generators.md index 93fb5eece8..be64f1638d 100644 --- a/guides/source/generators.md +++ b/guides/source/generators.md @@ -35,7 +35,7 @@ $ bin/rails generate helper --help Creating Your First Generator ----------------------------- -Since Rails 3.0, generators are built on top of [Thor](https://github.com/erikhuda/thor). Thor provides powerful options parsing and a great API for manipulating files. For instance, let's build a generator that creates an initializer file named `initializer.rb` inside `config/initializers`. +Since Rails 3.0, generators are built on top of [Thor](https://github.com/erikhuda/thor). Thor provides powerful options for parsing and a great API for manipulating files. For instance, let's build a generator that creates an initializer file named `initializer.rb` inside `config/initializers`. The first step is to create a file at `lib/generators/initializer_generator.rb` with the following content: diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index ef97cda3bc..656d74ef06 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -120,7 +120,7 @@ To verify that you have everything installed correctly, you should be able to run the following: ```bash -$ bin/rails --version +$ rails --version ``` If it says something like "Rails 4.2.0", you are ready to continue. diff --git a/guides/source/routing.md b/guides/source/routing.md index c8f8ba3044..7a7334f25b 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -681,7 +681,7 @@ You can also constrain a route based on any method on the [Request object](actio You specify a request-based constraint the same way that you specify a segment constraint: ```ruby -get 'photos', constraints: { subdomain: 'admin' } +get 'photos', to: 'photos#index', constraints: { subdomain: 'admin' } ``` You can also specify constraints in a block form: |