- Improve CHANGELOG entry for #18439.
- The documentation is updated as per changes in PR #18439 to the
`accept` option.
- The explanation about the virtual attribute is moved at the end so
that the arity of `accept` option is explained first.
- Added a note that `message` can also be passed to `validates_acceptance_of`.
- Removed duplicate entry for collection caching.
- The entry was duplicate and the link to PR was also wrong.
- Consolidated entries for `belongs_to` required by default.
Some configuration options started with a capital letter indicating the beginning of a sentence, which didn't makes sense without the colons. Similarly, some were missing periods at the end of their descriptions. [ci skip]
[ci skip] Added note on child class maintaining parent's queue adapter.
[ci skip] Added note on child class maintaining parent's queue adapter.
[ci skip] removed documentation for child class inheriting the queue adapter.
- Add link for finding the addional options for index.
- Add example for unique index as this is a common requirement.
- Add link in guide for index options.
Comments are specified in migrations, stored in database itself (in its schema),
and dumped into db/schema.rb file.
This allows to generate good documentation and explain columns and tables' purpose
to everyone from new developers to database administrators.
For PostgreSQL and MySQL only. SQLite does not support comments at the moment.
See docs for PostgreSQL: http://www.postgresql.org/docs/current/static/sql-comment.html
See docs for MySQL: http://dev.mysql.com/doc/refman/5.7/en/create-table.html
- Update info for weak ETag
- Add info for strong ETag
- Add examples for strong and weak ETags
- Display difference between generated strong and weak ETags strings.
[restful-authentication](https://rubygems.org/gems/restful-authentication/versions/1.2.1) hasn't been updated since
September 6th, 2012 so it might not be a great idea to recommend that Rails users try it out.
Devise seems like a much more popular and secure solution that automatically resets sessions on sign in and out
so it's a great example in this case.
/cc @tenderlove @josevalim
[ci skip]
Sync AV, AR, AJ, AS, AM changelogs with our 5.0 release notes draft.
This is a follow up to c94045d and contains changes made since the
release of beta1.
[ci skip]
This updates the 5.0 release notes guide to reflect changes that
happened after beta1 has been released.
I'll sync the other changelogs later today but I'll push this batch to
prevent against cumbersome merge conflicts.
The logger interface to get all Rails features is not obvious. This change adds documentation on how to assign a logger that will use all Rails features.
We are also matching the stdout logging interface to the default logger in bootstrap f5a5988352/railties/lib/rails/application/bootstrap.rb (L42-L45).
Clarifies the documentation here to mean all options are for when the
relation is destroyed; also now reflects the documentation on this same
option found in the has_one section.
In the latest security releases render with a trailing slash no more call
render :file.
Also add a note about the security implications of using it with user
parameters.
Added information about inserting middlewares with indexes. I think this information useful. We can use indexes also for `insert_after` but the behavior is not same and this is not the right place to give full information about all configuration options.
The configuration for I18n fallbacks is important for production environment. Especially using different fallbacks for different locales.
The `before_save` callback used with `set_author` results in the
validation error "Author must exist," due to the change in `belongs_to`
behavior introduced by #18937.
Use `before_validation` instead.
- We no longer add `null: false` for timestamps columns as per
a939506f29.
- Similarly `references` and `belongs_to` columns no longer mention
`index: true` in migration files. It's added by default as per
909818b93b.
This guides were pointing to this command `rails app:update`, which I
tried to run, but it didnt worked. I think the right command is `rails
rails:update` instead. Also thats the name of the rake task.
Also I removed the `Rake` word from the title, as we run it using
`rails` bin now.
cc @kaspth
[skip ci]
1. Conceptually revert #20276
The feature was implemented for the `responders` gem. In the end,
they did not need that feature, and have found a better fix (see
plataformatec/responders#131).
`ImplicitRender` is the place where Rails specifies our default
policies for the case where the user did not explicitly tell us
what to render, essentially describing a set of heuristics. If
the gem (or the user) knows exactly what they want, they could
just perform the correct `render` to avoid falling through to
here, as `responders` did (the user called `respond_with`).
Reverting the patch allows us to avoid exploding the complexity
and defining “the fallback for a fallback” policies.
2. `respond_to` and templates are considered exhaustive enumerations
If the user specified a list of formats/variants in a `respond_to`
block, anything that is not explicitly included should result
in an `UnknownFormat` error (which is then caught upstream to
mean “406 Not Acceptable” by default). This is already how it
works before this commit.
Same goes for templates – if the user defined a set of templates
(usually in the file system), that set is now considered exhaustive,
which means that “missing” templates are considered `UnknownFormat`
errors (406).
3. To keep API endpoints simple, the implicit render behavior for
actions with no templates defined at all (regardless of formats,
locales, variants, etc) are defaulted to “204 No Content”. This
is a strictly narrower version of the feature landed in #19036 and
#19377.
4. To avoid confusion when interacting in the browser, these actions
will raise an `UnknownFormat` error for “interactive” requests
instead. (The precise definition of “interactive” requests might
change – the spirit here is to give helpful messages and avoid
confusions.)
Closes#20666, #23062, #23077, #23564
[Godfrey Chan, Jon Moss, Kasper Timm Hansen, Mike Clark, Matthew Draper]
- #23771 removed the reference to debug_exception_response_format from the api_app documentation.
- We need to let users know, they have ability to configure debug_exception_response_format in their development environment.
- Added documentation for the same in api_app.md file
- Grammar corrections
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]