Since Rails 5.0 is switching the Rails command line from 'rake …'
to 'rails …', it makes sense to also replace the `rake` method in
the Rails templates API.
Based on feedback from @matthewd and @kaspth, I chose to replace
`rake` with `rails_command`, which is less confusing than
the alternatives `rails` or `command` or `rails_run` and is not
Thor-reserved word like `task`.
Since a0343d11f1bf80a79e273c1d0cf9934ef2601e98, `debug_exception_response_format` config depends on `api_only`.
Therefore, if set the `api_only`, need to specify `debug_exception_response_format` is not.
Whenever you are sending emails in integration tests using the `:test`
delivery method you need to make sure that
`ActionMailer::Base.deliveries` is reset after every test. This piece of
boilerplate code is present in all my applications that send
emails. Let's have `ActionDispatch::IntegrationTest` reset the
deliveries automatically.
Rails Guide for Action Cable
Added content from README
Pull additional information from Action Cable README and restructured Client/Server elements
Update to list numbering
Switched from list numbers to headings in the examples
Change AppearancesChannel to AppearanceChannel
Word missing
fixed missing word.
Removed Mistaken nesting of Channel class
Removed nesting of ChatChannel and AppearanceChannel from within ApplicationChannel Module. (Copy&Paste error)
Incorporated first round of comments
1. Capitalize "action cable"
2. Separated "Consumers require... via JavaScript" into two sentences
3. Minor typographical correction (remember...)
4. Extra backtick
5. Revised text which implied Redis was the exclusive storage adapter to reflect it's position as default.
6. Revised reference to denote correct config file location: config/cable.yml
7. Added adapter: redis to environment configuration blocks
8. Capitalized "R" for "Rack"
9. Revised syntax for routing to reflect the hash syntax. (to: NOT :to =>)
10. Removed reference to Action Cable being separate from Rails.
11. Began revision for adapter API [I believe this requires a reformatting of the 'Redis' portion of the configuration section to simply "Storage Adapters"]
12. Celluloid -> Concurrent-ruby
Moved errant grave mark [ci skip]
Reordered "In App" above "Standalone" [ci skip]
Reordered to reflect "In App" as preferable to "Standalone"
Action Cable Deployment [ci skip]
Removed paragraph that alludes to Action Cable not being able to run in the same process as Rails.
Removed EM reference and updated deployment [ci skip]
Removed explicit multi-threaded server dependency reference [ci skip]
Revised Configuration and fixed typos [ci skip]
Switched Lifecycle Graphic for Detailed Description [ci skip]
Switched from Lifecycle graphic to detailed description to facilitate revision and maintainability in the future.
Capitalized Heading (typo) [ci skip]
Implemented merged commits from README [ci skip]
Pulled over all (or at least I believe all) merged commits from README. (Dec 14, 2015 - Feb 11, 2016)
Editorial - Capitalize WebSockets [ci skip]
Reformated lines to ~75 characters [ci skip]
The iterative process one has to follow is not currently documented, and
people could be unfamiliar with the Rails versioning scheme, causing
them to skip versions or upgrade to patch releases.
[ci skip]
- Remove ActionController `logger` and `initialize_framework_caches`
which were merged into `set_configs` in fbc9d0f4
- Rename ActiveRecord `set_reloader_hooks` changed in 283a0876
- Add missing initializers for ActionController and ActiveRecord
for rails/rails#23431
modified: guides/source/asset_pipeline.md
* description of asset combination from apps and gems, e.g. jquery-rails
* after @vipulnsward's related change rails/rails#23479
correction: --skip-sprockets will prevent all of these gems, not just sass-rails and uglifier
modified: guides/source/working_with_javascript_in_rails.md
* noted that rails.js requires the asset pipeline
[ci skip]
add some documentation and add 4 tests regarding error vs. warning behavior
fix a typo when referring to the message
go back to default in tests so that ordering is not important. use a constant instead of method. fix assert_nothing_raised call. use self.klass to allow per class configuration
remove logger warn assets as that is tested elsewhere. pass error_on_ignore through find_each and find_in_batches also.
add blocks to the finds so that the code is actually executed
put the setting back to default in an ensure
Add a changelog entry
The initialization documentation references `rails/commands/command_task.rb`. This appears to be a typo as the file is actually `rails/commands/commands_task.rb`.
Add two options: `-c` and `-g`.
`-g` option returns the urls name, verb and path fields that match the pattern.
`-c` option returns the urls for specific controller.
Fixes#18902, and Fixes#20420
[Anton Davydov & Vipul A M]
- sprockets-rails no longer supports customizing cache store after
rails/sprockets-rails@ecaeb27 using `config.assets.cache_store`.
- Instead we need to configure it using block syntax.
- Fixes#19835.
This is to fill in some missing information as apart of #22931.
It's on purpose that the sample `Message` model inherits from
`ActiveRecord::Base` -- Active Record is not meant to be coupled to
Rails, and we can't guarantee that users outside of the Rails world will
have an `ApplicationRecord` class that inherits from
`ActiveRecord::Base`.
[ci skip]
Pass through correcting api_app.md. The list of included modules and
middleware was tested through a sample API app, and was listed in the
same order an end user would see in their terminal.
[ci skip]
When I was looking for more info regarding this the only way I ended up
on that page was by googling something along the lines of "rails new
api" (as I wanted to find out what are the proper parameters when
generating api app). I think it's beneficial to have that page in table
of contents.
- Grammar fixes
- Wordsmitting
- Fixed wrong statement about association usage in fixtures
- Changed association name from 'one' to 'first' instead
- More consistent usage of we/our
- Mentions assert_select is below, not already covered in Integration test.
[ci skip]
- Grammar improvements
- Consistent usage of you or we in sentences
- Tests can have zero or more assertions. Its not mandatory to have one.
- Example for assert_send
[ci skip]
I go through the `http://edgeguides.rubyonrails.org/` and found `rake` commands in various files that are in RAILS 5.0 implement by `bin/rails` command. I try to change all that can be directly use `bin/rails …`
The current example
add_index :person_articles, :article, unique: true
Does not work, the `:article` column does not exist as it will be
a join table (based on the prior example) so should use :article_id
The documentation seems to suggest that it will allow an article to
be added only once to a person via the join table, what actually
occurs is that it only allows the article to be added to one person,
at which point it should be a `belongs_to` association.
Also changed the new example to use readings based on the prior example
- Avoided truncating all files if no ENV['LOGS'] specified
- Updated task to accept LOGS=all for truncating all files from log/ i.e. log/*log
- If no LOGS specified will truncates standard environment log files i.e. 'development,test,production'
- CHANGELOG & guide update added
- bin/setup test cases fixed