Commit Graph

1661 Commits

Author SHA1 Message Date
Mehmet Emin İNAÇ
5b36015830 Add nodoc to the Validations::Helpers [ci skip] 2015-06-22 20:06:42 +03:00
Yves Senn
ebc4c607a7 docs, ✂️ wrongly placed heading. [ci skip]
The heading "Active Model Length Validator" was shown on the
"ActiveModel::Validations" page without any text following it.
2015-06-22 15:52:47 +02:00
Roque Pinel
bfd4e6a0bc Move the validations HelperMethods to its own file
Closes #11209

[Roque Pinel & Steven Yang]
2015-06-21 19:56:53 -04:00
Yves Senn
9946788775 select the AR adapter through bin/test. 2015-06-11 14:24:56 +02:00
Yves Senn
54d84cbb77 use our runner (bin/test) for framework components.
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.
2015-06-11 14:12:15 +02:00
Rafael Mendonça França
96bb004fc6 Revert "Add code example for include option of AM::Serialization#serializable_hash"
This reverts commit 3d949f34816d6eca0a6b59cfa08d91f36e8e64dd.

This was already documented in other PR.
2015-06-10 08:50:39 -03:00
Radan Skoric
3d949f3481 Add code example for include option of AM::Serialization#serializable_hash 2015-06-09 17:41:14 -03:00
Anton Davydov
3f92a8247c Fix typo in AM I18n validation test name [skip ci] 2015-06-09 01:23:20 +03:00
Robin Dupret
b10c3866d7 Tiny documentation edits [ci skip] 2015-06-07 16:01:09 +02:00
Robin Dupret
911f189f88 Merge pull request #20004 from rusikf/patch-1
add docs to include option at ActiveModel::Serialization [ci skip]
2015-06-07 15:53:53 +02:00
Rafael Mendonça França
109e71d2bb Require yaml for isolation test
It was removed when we removed mocha at
5a6ae7f7539216931f2b3f4aa53394ac4136c74e
2015-05-29 18:22:39 -03:00
unknown
3833d4529f formatting changes 2015-05-29 16:27:23 -04:00
Roque Pinel
5a6ae7f753 Remove use of mocha from Active Model 2015-05-28 18:35:17 -05:00
Arun Agrawal
21b6b68f63 Remove unused package tasks
We are using `all:build` now.
2015-05-28 09:06:10 +02:00
Yves Senn
852460852c Merge pull request #20262 from arunagw/aa-remove-broken-unused-release-task
Remove broken and unused release task
2015-05-27 09:14:19 +02:00
karanarora
0750330941 Spelling/typo/grammatical fixes [ci skip]
spelling fix [ci skip]

example to be consistent [ci skip]

grammatical fix

typo fixes [ci skip]
2015-05-23 03:01:33 +05:30
Arun Agrawal
4194d052d8 Remove broken and unused release task
- We do release with release.rb
- There is no `rake/gemcutter`
2015-05-22 14:30:30 +02:00
claudiob
0080a886b2 [ci skip] Don’t encourage sudo gem install
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? 😁
2015-05-12 14:51:19 -07:00
rusikf
47896b3d08 add docs to include option at ActiveModel::Serialization#serializable_hash [ci skip] 2015-05-11 13:10:30 +03:00
claudiob
58fc63fd96 Stop skipping a test that now works on Rubinius
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
```
2015-05-10 16:24:46 -07:00
Gourav Tiwari
6b557ae709 minor rdoc syntax fix [ci skip] 2015-05-08 14:45:32 -07:00
Zamith
6f418a09d8
Adds/Corrects use case for adding an error message
I believe this is a use case that was supposed to be supported, and it's
a small fix.
2015-05-04 13:36:26 +01:00
Jay Elaraj
b2967999ae ensure method_missing called for non-existing methods passed to
`ActiveModel::Serialization#serializable_hash`
2015-04-28 21:06:30 -04:00
Zachary Scott
dee4fbc90b Don't document private internal constant [ci skip] 2015-04-26 15:47:29 -07:00
Tim Wade
f207d948c8
Fix grammar/style: assigns/declares -> assignments/declarations.
[ci skip]
2015-04-24 09:02:38 -04:00
Tim Wade
ed6de3afcc
Fix grammar/style: use (v) fall back (on).
[ci skip]
2015-04-24 08:52:51 -04:00
Tim Wade
37349f71ad
Fix grammar/style: break up long sentence.
A conjunction was needed to make these sentences correct. Breaking them
up seemed like a better option.

[ci skip]
2015-04-24 08:40:41 -04:00
Tim Wade
875f675284
Fix grammar/style: pluralize 'each of its method'
[ci skip]
2015-04-24 08:32:58 -04:00
Yves Senn
cdbf685994 pass over CHANGELOGs. [ci skip] 2015-04-22 14:44:30 +02:00
Fernando Tapia Rico
f072db8e4f Add ActiveModel::Dirty#[attr_name]_previously_changed? and
`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.
2015-04-21 19:30:46 +02:00
Guillermo Iguaran
33ea933d7b Merge pull request #19753 from jonatack/use-ruby-2-2-2
Upgrade to Ruby 2.2.2
2015-04-13 22:56:47 -05:00
Jon Atack
32f7491808 Upgrade to Ruby 2.2.2
and fix the grammar in the ruby_version_check.rb user message.
2015-04-14 08:41:56 +05:30
Rafael Mendonça França
c539cc0061 Merge pull request #19448 from tgxworld/fix_activesupport_callbacks_clash_on_run
Fix AS::Callbacks raising an error when `:run` callback is defined.
2015-04-06 18:58:19 -03:00
Yves Senn
70b7e281de fix typo in deprecation message. [Robin Dupret] 2015-04-05 17:23:36 +02:00
Robin Dupret
9cc41c36f7 Fix a few typos [ci skip] 2015-04-05 15:58:43 +02:00
Guillermo Iguaran
151aa690a2 Merge pull request #19594 from radar/require-module-delegation
Require Module#delegate core ext in ActiveModel::Naming
2015-03-30 19:56:57 -05:00
Ryan Bigg
b6bf58c220 Require Module#delegate core ext in ActiveModel::Naming 2015-03-31 11:41:16 +11:00
Rafael Mendonça França
7131f6ba22 Merge pull request #19021 from morgoth/activemodel-errors-refactoring
Simplify and alias ActiveModel::Errors methods where possible
2015-03-30 13:47:30 -03:00
Sean Griffin
1c341eb7cb Deprecate the :tokenizer option to validates_length_of
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.
2015-03-29 16:34:01 -06:00
Carlos Antonio da Silva
a3f030686b Fix arguments order on assertion
The expected value comes first. Related to #19465.
2015-03-22 20:25:27 -03:00
Radan Skoric
26b35a4096 Fix ActiveModel::Errors#delete return value to stay backward compatible
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.
2015-03-22 23:18:22 +01:00
Guo Xiang Tan
bdc1d329d4 Revert "Reduce allocations when running AR callbacks."
This reverts commit 796cab45561fce268aa74e6587cdb9cae3bb243e.
2015-03-22 11:21:02 +08:00
Radan Skoric
cf7fac7e29 Fix ActiveModel::Errors deprecation messages failing when used on its own
Deprecation messages in ActiveModel::Errors are using String#squish
from ActiveSupport but were not explicitly requiring it, causing failures
when used outside rails.
2015-03-21 12:35:25 +01:00
Peter Suschlik
f0768eba28 Target Ruby 2.2.1 in gemspecs
This is a follow-up to #19257
2015-03-09 09:56:26 +01:00
Matthew Draper
e462021396 Revert "For now, we will keep sorting the tests."
This reverts commit 7025d7769dc53f0a3ffab8b537727ef3fee367fc.
2015-03-06 04:39:20 +10:30
Matthew Draper
b5eb0b6cc3 Revert "Leave all our tests as order_dependent! for now"
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
2015-03-06 04:38:54 +10:30
Melanie Gilman
9034938714 Fix spelling error in has_secure_password documentation [ci skip] 2015-03-03 20:05:02 -05:00
Rafael Mendonça França
ed6be59624 Merge pull request #19173 from robin850/rbx-build
Improve the Rubinius build
2015-03-02 13:48:45 -03:00
Robin Dupret
562b0b2368 Skip the failing tests on Rubinius for now 2015-03-02 17:28:12 +01:00
Sean Griffin
c0584ea034 Merge pull request #19077 from robin850/unknown-attribute-error
Move `UnknownAttributeError` to a more sane namespace
2015-03-02 09:21:42 -07:00