| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Person called GoodnessValidator before it was defined.
This change will compile the example correctly.
|
|
|
|
| |
Fixes: #13108
[ci skip]
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Removed ```The `size` helper is an alias for `length`.``` line. If you use this "nonexist" helper, you will get an error message like this:
```
ArgumentError: Unknown validator: 'SizeValidator'
...
```
Maybe wanted to mean ```validates_size_of``` helper as an alias for ```validates_length_of``` helper.
|
|
|
| |
A small mistake found in the line of ```The default error is "can't be empty"``` for ```:presence``` helper. ```empty``` word changed to ```blank```.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
helper was never available
According to the guide, ":save" value for the "on:" validation helper
was available like below
validates :name, presence: true, on: :save
but this was never available according to the implementation of the
valid? method, which is below
# Runs all the validations within the specified context. Returns
+true+ if
# no errors are found, +false+ otherwise.
#
# If the argument is +false+ (default is +nil+), the context is set
to <tt>:create</tt> if
# <tt>new_record?</tt> is +true+, and to <tt>:update</tt> if it is
not.
#
# Validations with no <tt>:on</tt> option will run no matter the
context. Validations with
# some <tt>:on</tt> option will only run in the specified context.
def valid?(context = nil)
context ||= (new_record? ? :create : :update)
output = super(context)
errors.empty? && output
end
So the documentation was always wrong since the PR proposed by
@neerajdotname ( #10287 ) was rejected.
|
|
|
|
| |
Closes #11498.
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
guides/source/upgrading_ruby_on_rails.md
|
| | |
|
| | |
|
| | |
|
|/
|
| |
The capital O was awkward and the validation wouldn't read "right" to the user.
|
| |
|
|
|
|
| |
description in validations
|
| |
|
| |
|
|
|
| |
Of course validates_presence_of is still working but it is not explained in the guide, I think consequently should use 'presence: true' in this documentation.
|
| |
|
| |
|
|
|
| |
As discussed with @josevalim on Ruby Rogues Parley.
|
|
|
| |
Duplicated `update`
|
| |
|
|
|
|
| |
These tips were documenting an inconsistency issue https://github.com/rails/rails/issues/8621. That issue is resolved by https://github.com/rails/rails/issues/8622.
|
|
|
|
|
| |
Somehow this got lost in my PRs before. I'm going to re-check all the
guides to make sure this didn't happen again elsewhere.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
https://github.com/lifo/docrails/commit/55a2820cc6d33e96b8d1b64b38b033913058dce4
messes up
https://github.com/lifo/docrails/commit/cfd324b4b68469ba3188e4b7ba8586e59b239693
Hopefully there is other stuff lost in translation...
|
|\ |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
The other way it was not marking the text as italic, it was showing the
underlines as normal text.
Also fixes some code examples indentation and # => marks in Active Model
and Active Record guides.
[ci skip]
|
|
|
|
|
|
|
|
| |
plus:
* 80 column formats
* replacing the explanation of the dynamic_form gem with the example
HTML/CSS that Rails scaffolds generate.
|
|
|
|
|
| |
Conflicts:
guides/source/active_record_validations.md
|
|
Two big features that are only barely related in the same guide. Seems
bad.
I did not check references to these guides yet, so some links may need
to be updated.
|