Commit Graph

1644 Commits

Author SHA1 Message Date
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
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
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
Robin Dupret
823e4e9115 Add the platform-specific skip helpers to ActiveModel 2015-03-02 14:05:07 +01:00
Vipul A M
cdaab2c479 Removed non-standard and unused require 'active_support/deprecation' from parts out of active_support. 2015-02-27 23:20:09 +05:30
Robin Dupret
95c2fc9679 Follow-up to #10776
The name `ActiveModel::AttributeAssignment::UnknownAttributeError` is
too implementation specific so let's move the constant directly under
the ActiveModel namespace.

Also since this constant used to be under the ActiveRecord namespace, to
make the upgrade path easier, let's avoid raising the former constant
when we deal with this error on the Active Record side.
2015-02-26 15:40:03 +01:00
Ian Ker-Seymer
c5d62cb86d activemodel: make .model_name json encodable
Previously, calling `User.model_name.to_json` would result in an infinite
recursion as `.model_name` inherited its `.as_json` behavior from Object. This
patch fixes that unexpected behavior by delegating `.as_json` to :name.
2015-02-24 11:00:32 -07:00
Yves Senn
e71f5dad4e some indenting and punctuation fixes. [ci skip] 2015-02-23 16:54:40 +01:00
Rafael Mendonça França
f55bfe7260 Change the deprecation messages to show the preferred way to work with
ActiveModel::Errors
2015-02-20 20:58:58 -02:00
Wojciech Wnętrzak
9ebb778ca0 Simplify and alias ActiveModel::Errors methods where possible 2015-02-20 21:42:00 +01:00
Lucas Mazza
830b7041f2 Move the validate! method to ActiveModel::Validations. 2015-02-20 16:05:26 -02:00
Rafael Mendonça França
e0f29c51b9 Merge pull request #17144 from skojin/patch-doc-validation-format-z-regexp
fix mistype in doc about \z regexp
2015-02-20 14:30:47 -02:00
yuuji.yaginuma
66e2e19bc0 use messages instead of deprecated ActiveModel::Errors#[]= method [ci skip] 2015-02-20 23:53:36 +09:00
Yves Senn
259d33db8c Merge pull request #18996 from morgoth/deprecate-more-errors-methods
Deprecate `ActiveModel::Errors` `add_on_empty` and `add_on_blank` methods
2015-02-19 14:16:47 +01:00
Wojciech Wnętrzak
fd38838f29 Deprecate ActiveModel::Errors add_on_empty and add_on_blank methods
without replacement.
2015-02-19 14:10:38 +01:00
Rafael Mendonça França
3c750c4c6c Merge pull request #18634 from morgoth/deprecate-some-errors-methods
Deprecate `ActiveModel::Errors` `get`, `set` and `[]=` methods.
2015-02-18 18:58:28 -02:00
Robin Dupret
1747c4e2ce Tiny documentation edits [ci skip] 2015-02-15 19:19:04 +01:00
Vijay Dev
95546d4935 Merge branch 'master' of github.com:rails/docrails 2015-02-14 15:35:47 +00:00
Rafael Mendonça França
7919c29d50 Merge pull request #16381 from kakipo/validate-length-tokenizer
Allow symbol as values for `tokenizer` of `LengthValidator`
2015-02-13 12:09:36 -02:00
Rafael Mendonça França
16809025fe Merge pull request #18388 from claudiob/better-docs-for-active-model-lint-tests
Better docs for AM::Lint::Tests
2015-02-06 11:06:59 -02:00