aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_validations.md
Commit message (Collapse)AuthorAgeFilesLines
* Fix guide. sample code syntax error.[ci skip]tbpgr2014-07-041-1/+1
|
* Rename Posts to Articles in Guides, continuation of 2d446e77 / #13774 [ci skip]John Kelly Ferguson2014-05-211-5/+5
|
* Use generated binstubs in guides examples.Josef Šimánek2014-05-201-1/+1
| | | | [ci skip]
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-02-091-1/+1
|\ | | | | | | | | | | | | Conflicts: guides/source/active_record_validations.md guides/source/api_documentation_guidelines.md guides/source/configuring.md
| * Use full-length version of multiple from c7abc51Zachary Scott2014-02-091-1/+1
| |
| * docs, link MySQL manual for multi column indexes. [ci ckip].Yves Senn2014-02-091-1/+3
| | | | | | | | Closes #9131.
* | docs, link MySQL manual for multi column indexes. [ci ckip].Yves Senn2014-02-041-1/+3
| | | | | | | | Closes #9131.
* | Reordered classes in AR Validation #validates_with example [ci skip]John Olmsted & Strand McCutchen2014-01-241-8/+8
|/ | | | | Person called GoodnessValidator before it was defined. This change will compile the example correctly.
* Removed redundant field name in the guide Paul Nikitochkin2013-12-011-1/+1
| | | | Fixes: #13108 [ci skip]
* [ci skip] Replace #=> with # =>Alex Johnson2013-11-121-9/+9
|
* Remove size alias for length validationSıtkı Bağdat2013-10-141-2/+0
| | | | | | | | | | 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.
* Fix a writing mistakeSıtkı Bağdat2013-10-121-1/+1
| | | A small mistake found in the line of ```The default error is "can't be empty"``` for ```:presence``` helper. ```empty``` word changed to ```blank```.
* [Validations Guide] Add full stop to the end of sentence [ci skip]Francis Go2013-10-101-1/+1
|
* cleans the guides sources from fancy non-ASCII stuffXavier Noria2013-08-231-1/+1
|
* Fix active_record_validations.md document, `:save` for `on:` validation ↵Takehiro Adachi2013-08-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix typo in Active Record Validations guide. [ci skip].Yves Senn2013-07-191-1/+1
| | | | Closes #11498.
* [doc] Update return false if record is invalidRashmi Yadav2013-06-191-2/+2
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-06-141-5/+5
|\ | | | | | | | | Conflicts: guides/source/upgrading_ruby_on_rails.md
| * Using 1.9 syntax for edge guidesRashmi Yadav2013-06-121-2/+2
| |
| * Remove double spaces in guidesSunny Ripert2013-05-281-1/+1
| |
| * End-of-line whitespace huntSunny Ripert2013-05-281-2/+2
| |
* | change format example to read better when rendered with full_messagesbarelyknown2013-06-081-1/+1
|/ | | The capital O was awkward and the validation wouldn't read "right" to the user.
* Corrected documentation regarding validation errorsRadu Busuioc2013-05-161-7/+7
|
* Added instructions of latest bundler install + modified the on: :save option ↵aditya-kapoor2013-04-221-2/+1
| | | | description in validations
* corrected a typo related to on: :save option in validationsaditya-kapoor2013-04-221-1/+1
|
* corrected a line related to on: :save option in validationsaditya-kapoor2013-04-221-0/+2
|
* Change 'validates_presence_of' to 'presence: true' Zoltan Debre2013-04-161-1/+1
| | | 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.
* fix absence validator doc for boolean fieldAngelo capilleri2013-03-131-2/+2
|
* absence validator docAngelo capilleri2013-03-131-0/+41
|
* Validations guide: validates_with init clarification.Henrik Nyh2013-02-091-0/+29
| | | As discussed with @josevalim on Ruby Rogues Parley.
* Update guides/source/active_record_validations.mdAnton Cherepanov2013-01-151-1/+0
| | | Duplicated `update`
* Change guides to use update instead of update_attributesAmparo Luna + Guillermo Iguaran2013-01-031-3/+3
|
* removed TIP: :allow_nil/:allow_blank is ignored by the presence validatorColin Kelley2012-12-261-4/+0
| | | | 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.
* Restored 'Working with Validation Errors'Steve Klabnik2012-12-161-0/+140
| | | | | 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.
* copy editing [ci skip]Vijay Dev2012-12-151-1/+1
|
* Elaborate using `inverse_of` with presence validationJay Hayes2012-12-131-1/+2
|
* Fix associations presence lost in steve's reformatJay Hayes2012-12-131-2/+2
| | | | | | | | https://github.com/lifo/docrails/commit/55a2820cc6d33e96b8d1b64b38b033913058dce4 messes up https://github.com/lifo/docrails/commit/cfd324b4b68469ba3188e4b7ba8586e59b239693 Hopefully there is other stuff lost in translation...
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-081-5/+5
|\
| * Punctuation, capitalization, grammar fixes in rails guidesKatie Oldaker2012-12-071-2/+2
| |
| * Fixed grammar in a lot of guide prologues.Katie Oldaker2012-12-071-3/+3
| |
* | Fix Active Record validation error messages markup in guidesCarlos Antonio da Silva2012-12-041-21/+21
|/ | | | | | | | | | 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]
* Here's a few updates to the validations guide. A bunch of small changes,Steve Klabnik2012-12-011-347/+342
| | | | | | | | plus: * 80 column formats * replacing the explanation of the dynamic_form gem with the example HTML/CSS that Rails scaffolds generate.
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-011-10/+18
| | | | | Conflicts: guides/source/active_record_validations.md
* Split Validations and Callbacks into separate guides.Steve Klabnik2012-11-291-0/+960
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.