aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
Commit message (Collapse)AuthorAgeFilesLines
* Separate the constraint and other options [ci skip]Robin Dupret2015-07-011-3/+8
| | | | | | | | | | Only one constraint option can be used at a time (except for the minimum and maximum ones that can eventually be combined). However, other options can be used with them (e.g. the validation failure message). So let's make the distinction between these two different options categories. [Yves Senn, Matthew Draper & Robin Dupret]
* Improve Validation Helpers' documentation comments and testsRadan Skoric2015-06-275-7/+41
|
* A few documentation fixes [ci skip]Robin Dupret2015-06-231-1/+1
|
* Add nodoc to the Validations::Helpers [ci skip]Mehmet Emin İNAÇ2015-06-221-1/+1
|
* docs, :scissors: wrongly placed heading. [ci skip]Yves Senn2015-06-221-2/+0
| | | | | The heading "Active Model Length Validator" was shown on the "ActiveModel::Validations" page without any text following it.
* Move the validations HelperMethods to its own fileRoque Pinel2015-06-212-10/+13
| | | | | | Closes #11209 [Roque Pinel & Steven Yang]
* select the AR adapter through `bin/test`.Yves Senn2015-06-111-0/+1
|
* use our runner (`bin/test`) for framework components.Yves Senn2015-06-111-0/+3
| | | | | | | | | | This adds a script `bin/test` to most Rails framework components. The script uses the rails minitest plugin to augment the runner. See https://github.com/rails/rails/pull/19571 for details about the plugin. I did not yet add `bin/test` for activerecord, activejob and railties. These components rely on specific setup performed in the rake-tasks.
* Revert "Add code example for include option of ↵Rafael Mendonça França2015-06-101-14/+1
| | | | | | | | AM::Serialization#serializable_hash" This reverts commit 3d949f34816d6eca0a6b59cfa08d91f36e8e64dd. This was already documented in other PR.
* Add code example for include option of AM::Serialization#serializable_hashRadan Skoric2015-06-091-1/+14
|
* Fix typo in AM I18n validation test name [skip ci]Anton Davydov2015-06-091-1/+1
|
* Tiny documentation edits [ci skip]Robin Dupret2015-06-071-2/+2
|
* Merge pull request #20004 from rusikf/patch-1Robin Dupret2015-06-071-0/+31
|\ | | | | add docs to include option at ActiveModel::Serialization [ci skip]
| * add docs to include option at ActiveModel::Serialization#serializable_hash ↵rusikf2015-05-111-0/+31
| | | | | | | | [ci skip]
* | Require yaml for isolation testRafael Mendonça França2015-05-291-0/+1
| | | | | | | | | | It was removed when we removed mocha at 5a6ae7f7539216931f2b3f4aa53394ac4136c74e
* | formatting changesunknown2015-05-292-5/+5
| |
* | Remove use of mocha from Active ModelRoque Pinel2015-05-284-59/+117
| |
* | Remove unused package tasksArun Agrawal2015-05-281-10/+2
| | | | | | | | We are using `all:build` now.
* | Merge pull request #20262 from arunagw/aa-remove-broken-unused-release-taskYves Senn2015-05-271-7/+0
|\ \ | | | | | | Remove broken and unused release task
| * | Remove broken and unused release taskArun Agrawal2015-05-221-7/+0
| | | | | | | | | | | | | | | - We do release with release.rb - There is no `rake/gemcutter`
* | | Spelling/typo/grammatical fixes [ci skip]karanarora2015-05-231-1/+1
|/ / | | | | | | | | | | | | | | | | | | spelling fix [ci skip] example to be consistent [ci skip] grammatical fix typo fixes [ci skip]
* | [ci skip] Don’t encourage `sudo gem install`claudiob2015-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | I think we are better off leaving `sudo` outside of the documented way of installing gems (`activerecord`, `actionpack`, …). We don’t want newbies to think that `sudo` is required or, even worse, than they actually have to type `[sudo] gem install`. In most scenarios, `sudo` is not needed to install gems, and people who do need it, probably already know about it. What do you think? :grin:
* | Stop skipping a test that now works on Rubiniusclaudiob2015-05-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was skipped because of an issue that, in the meantime, has been fixed: https://github.com/rubinius/rubinius/issues/3328. Using the latest Rubinius (the one currently on Travis CI), this is the result: ```sh $ ruby --version rubinius 2.5.3 (2.1.0 2482b093 2015-05-10 3.5.1 JI) [x86_64-darwin14.3.0] ``` **Before this PR** ```sh $ ruby -Itest test/cases/attribute_assignment_test.rb Run options: --seed 58569 .....S... Finished in 0.048278s, 186.4203 runs/s, 269.2738 assertions/s. 9 runs, 13 assertions, 0 failures, 0 errors, 1 skips You have skipped tests. Run with --verbose for details. ``` **After this PR** $ ruby -Itest test/cases/attribute_assignment_test.rb Run options: --seed 35720 ......... Finished in 0.029441s, 305.6961 runs/s, 475.5273 assertions/s. 9 runs, 14 assertions, 0 failures, 0 errors, 0 skips ```
* | minor rdoc syntax fix [ci skip]Gourav Tiwari2015-05-081-2/+2
| |
* | Adds/Corrects use case for adding an error messageZamith2015-05-042-1/+7
|/ | | | | I believe this is a use case that was supposed to be supported, and it's a small fix.
* ensure `method_missing` called for non-existing methods passed toJay Elaraj2015-04-283-10/+22
| | | | `ActiveModel::Serialization#serializable_hash`
* Don't document private internal constant [ci skip]Zachary Scott2015-04-261-0/+1
|
* Fix grammar/style: assigns/declares -> assignments/declarations.Tim Wade2015-04-241-3/+3
| | | | [ci skip]
* Fix grammar/style: use (v) fall back (on).Tim Wade2015-04-241-1/+1
| | | | [ci skip]
* Fix grammar/style: break up long sentence.Tim Wade2015-04-241-2/+2
| | | | | | | A conjunction was needed to make these sentences correct. Breaking them up seemed like a better option. [ci skip]
* Fix grammar/style: pluralize 'each of its method'Tim Wade2015-04-241-1/+1
| | | | [ci skip]
* pass over CHANGELOGs. [ci skip]Yves Senn2015-04-221-1/+1
|
* Add `ActiveModel::Dirty#[attr_name]_previously_changed?` andFernando Tapia Rico2015-04-213-2/+43
| | | | | | | | `ActiveModel::Dirty#[attr_name]_previous_change` to improve access to recorded changes after the model has been saved. It makes the dirty-attributes query methods consistent before and after saving.
* Merge pull request #19753 from jonatack/use-ruby-2-2-2Guillermo Iguaran2015-04-131-1/+1
|\ | | | | Upgrade to Ruby 2.2.2
| * Upgrade to Ruby 2.2.2Jon Atack2015-04-141-1/+1
| | | | | | | | and fix the grammar in the ruby_version_check.rb user message.
* | Merge pull request #19448 from tgxworld/fix_activesupport_callbacks_clash_on_runRafael Mendonça França2015-04-062-2/+2
|\ \ | | | | | | Fix AS::Callbacks raising an error when `:run` callback is defined.
| * | Revert "Reduce allocations when running AR callbacks."Guo Xiang Tan2015-03-222-2/+2
| | | | | | | | | | | | This reverts commit 796cab45561fce268aa74e6587cdb9cae3bb243e.
* | | fix typo in deprecation message. [Robin Dupret]Yves Senn2015-04-051-1/+1
| | |
* | | Fix a few typos [ci skip]Robin Dupret2015-04-051-4/+4
| |/ |/|
* | Merge pull request #19594 from radar/require-module-delegationGuillermo Iguaran2015-03-301-0/+1
|\ \ | | | | | | Require Module#delegate core ext in ActiveModel::Naming
| * | Require Module#delegate core ext in ActiveModel::NamingRyan Bigg2015-03-311-0/+1
| | |
* | | Merge pull request #19021 from morgoth/activemodel-errors-refactoringRafael Mendonça França2015-03-302-24/+10
|\ \ \ | | | | | | | | Simplify and alias ActiveModel::Errors methods where possible
| * | | Simplify and alias ActiveModel::Errors methods where possibleWojciech Wnętrzak2015-02-202-24/+10
| | | |
* | | | Deprecate the `:tokenizer` option to `validates_length_of`Sean Griffin2015-03-293-12/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As demonstrated by #19570, this option is severely limited, and satisfies an extremely specific use case. Realistically, there's not much reason for this option to exist. Its functionality can be trivially replicated with a normal Ruby method. Let's deprecate this option, in favor of the simpler solution.
* | | | Fix arguments order on assertionCarlos Antonio da Silva2015-03-221-1/+1
| | | | | | | | | | | | | | | | The expected value comes first. Related to #19465.
* | | | Fix ActiveModel::Errors#delete return value to stay backward compatibleRadan Skoric2015-03-222-7/+13
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails 5.0 changes to ActiveModel::Errors include addition of `details` that also accidentally changed the return value of `delete`. Since there was no test for that behavior it went unnoticed. This commit adds a test and fixes the regression. Small improvements to comments have also been made. Since `get` is getting deprecated it is better to use `[]` in other methods' code examples. Also, in the module usage example, `def Person.method` was replaced with a more commonly used `def self.method` code style.
* | | Fix ActiveModel::Errors deprecation messages failing when used on its ownRadan Skoric2015-03-211-0/+1
| | | | | | | | | | | | | | | | | | Deprecation messages in ActiveModel::Errors are using String#squish from ActiveSupport but were not explicitly requiring it, causing failures when used outside rails.
* | | Target Ruby 2.2.1 in gemspecsPeter Suschlik2015-03-091-1/+1
| | | | | | | | | | | | This is a follow-up to #19257
* | | Revert "For now, we will keep sorting the tests."Matthew Draper2015-03-061-1/+1
| | | | | | | | | | | | This reverts commit 7025d7769dc53f0a3ffab8b537727ef3fee367fc.
* | | Revert "Leave all our tests as order_dependent! for now"Matthew Draper2015-03-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2f52f969885b2834198de0045748436a4651a94e. Conflicts: actionmailer/test/abstract_unit.rb actionview/test/abstract_unit.rb activemodel/test/cases/helper.rb activerecord/test/cases/helper.rb activesupport/test/abstract_unit.rb railties/test/abstract_unit.rb