| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
albertoalmagro/albertoalmagro/prefer-rails-command-over-bin-rails
Prefer rails command over bin/rails
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As discussed in #33203 rails command already looks for, and runs,
bin/rails if it is present.
We were mixing recommendations within guides and USAGE guidelines,
in some files we recommended using rails, in others bin/rails and
in some cases we even had both options mixed together.
|
| |
| |
| |
| |
| | |
http links will be redirected to the https version, but still better to
just directly link to the https version.
|
|/ |
|
|
|
|
|
|
|
| |
[ci skip] A regular expression was used to find a lot of missing Oxford
commas and add them. The regular expression was as follows.
", ([a-zA-Z0-9.\`:'\"]+ ){1,6}(or|and) "
|
| |
|
|
|
|
|
|
| |
about passing string to `:if` and `:unless`.
This is a follow up to https://github.com/rails/rails/pull/28058 [ci
skip]
|
|
|
|
|
| |
It seems that it accepts only HTTPS connections.
Ref: https://github.com/postgres/postgres/commit/7f77cbd996855a06fb742ea11adbe55c42b48fe2
|
|
|
|
|
| |
Other examples were removed in 53ff5fc62f9d11b6f60d371df959137f4bf40728
[ci skip]
|
|
|
|
|
|
|
|
|
|
| |
This warning became obsolete when the regular expression was changed to
use `\z` instead of `\Z` in fce9c4e5e1ecb31cff2ca43a04fbe332816c3c45.
"-1234\n" =~ /\A[+-]?\d+\Z/ => 0
"-1234\n" =~ /\A[+-]?\d+\z/ => nil
[ci skip]
|
|
|
|
|
|
| |
[ci skip]
Follow up to #27608
|
| |
|
|
|
|
| |
Link to the more detailed message documentation when using a message option in validations.
|
|
|
|
|
|
|
|
|
|
|
| |
`validates_acceptance_of` [ci skip]
- 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`.
|
|
|
|
|
|
|
|
|
|
| |
[ci skip]
- This change is made as the behavior for `:message` proc was changed in
https://github.com/rails/rails/pull/24119.
- Also check
https://github.com/rails/rails/pull/24431#issuecomment-206106790 for
reference.
|
| |
|
|
|
|
| |
Add `:other_than` option documentation.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's pretty common for folks to monkey patch `ActiveRecord::Base` to
work around an issue or introduce extra functionality. Instead of
shoving even more stuff in `ActiveRecord::Base`, `ApplicationRecord` can
hold all those custom work the apps may need.
Now, we don't wanna encourage all of the application models to inherit
from `ActiveRecord::Base`, but we can encourage all the models that do,
to inherit from `ApplicationRecord`.
Newly generated applications have `app/models/application_record.rb`
present by default. The model generators are smart enough to recognize
that newly generated models have to inherit from `ApplicationRecord`,
but only if it's present.
|
|\
| |
| |
| | |
Document message validation option accepts Proc [ci skip]
|
|/ |
|
|
|
|
| |
`:tokenizer` option was deprecated in 1c341eb7cbaeb52435f14c2595e391bfb2e5e38b
|
|\
| |
| | |
activerecord guide: clarified roles of valid method and errors object [ci skip]
|
| | |
|
| |
| |
| |
| | |
@rafaelfranca suggested in https://github.com/rails/rails/commit/f7c7bcd9c2a8b0e8c2840295d001d2d4dfd4cfae that code examples should display
the result after `# =>` and not after `#=>`.
|
|\ \
| | |
| | | |
Update Validation guide for acceptance method
|
| |/ |
|
| |
| |
| |
| |
| | |
skip]
Bumps from `5.6` to `5.7`
|
|\ \
| |/
|/|
| | |
Add case_sensitive option for confirmation validation
|
| |
| |
| |
| |
| |
| |
| | |
Case :- 1. In case of email confirmation one needs case insensitive comparison
2. In case of password confirmation one needs case sensitive comparison
[ci skip] Update Guides for case_sensitive option in confirmation validation
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ci skip]
Closes #20792.
Custom validation methods are implemented in terms of
callbacks. The `validate` callback chain can't be halted using return
values of individual callbacks.
|
| |
| |
| |
| |
| | |
Addresses #20343.
Removes erroneous line of code in the sample codeblock.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove deprecated `[]=`
- Fix duplicate `errors#add` example. The second code example was
originally `[]=`, replace it with `[] <<`.
- Improve explanations for `errors#add` and `errors#full_messages`
Follow-up to PR #19457 (closed after borking my git history). Apologies
for the duplicate PR.
cc @kaspth
|
| | |
|
| | |
|
| |
| |
| |
| | |
ActiveModel::Errors
|
| | |
|
|\ \
| | |
| | | |
Correct pluralization error
|
| | | |
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To be able to return type of validator, one can now call `details`
on Errors instance:
```ruby
class User < ActiveRecord::Base
validates :name, presence: true
end
```
```ruby
user = User.new; user.valid?; user.errors.details
=> {name: [{error: :blank}]}
```
|
| |
| |
| |
| | |
- Changed `IN` to `ON` in all note sentences in guides.
|
| |
| |
| |
| | |
References #18148.
|
| | |
|