Adrien Coquio
1c2c552703
Add failing test for ActiveModel::Errors#has_key? method
...
From the doc, this method should return false and not nil if there is no errors for this key
2014-01-22 15:49:08 +01:00
Rafael Mendonça França
fc913d4016
Fix typo
2014-01-21 22:38:07 -02:00
Rafael Mendonça França
b8302bcfda
Forgot to push this change in the parent commit
2014-01-20 23:00:17 -02:00
Rafael Mendonça França
06a00038ef
When applying changes or reseting changes create the right class
...
Before this patch after the changes are applied the changes can be only
accessed using string keys, but before symbols are also accepted.
After this change every state of the model will be consistent.
2014-01-20 22:58:14 -02:00
Carlos Antonio da Silva
486db21f91
Fix eager load of Serializers on Active Model
2014-01-17 15:30:09 -02:00
Yves Senn
8c0d5e0d1c
doc proc/lambda arg on inclusion validation. Closes #13689 . [ci skip]
2014-01-13 11:25:58 +01:00
Carlos Antonio da Silva
3a33e8ea85
Use a better method name to check the requirement of password confirmation
...
Also improve changelog entries related to secure password to proper
highlight.
2014-01-07 07:59:44 -02:00
Carlos Antonio da Silva
a6da73f975
Fix typo in AMo docs [ci skip]
2014-01-06 08:45:21 -02:00
T.J. Schuck
72bb3fc297
Change all "can not"s to the correct "cannot".
2014-01-03 17:02:31 -05:00
Vipul A M
98cb3e69af
update copyright notices to 2014. [ci skip]
2014-01-01 23:59:49 +05:30
Vijay Dev
c4fb191a4c
Merge branch 'master' of github.com:lifo/docrails
2013-12-31 22:44:34 +05:30
Godfrey Chan
f3a8be3b8b
Merge pull request #13131 from gja/changed-accepts-values
...
Allows you to check if a field has changed to a particular value
2013-12-30 22:05:56 -08:00
Yves Senn
864514a460
Merge pull request #13483 from aditya-kapoor/add-missing-slashes
...
Adding missing backslashes in active_model files so as to avoid unwanted [ci skip]
2013-12-27 01:13:02 -08:00
aditya-kapoor
fe49f432c9
Adding missing backslashes in active_model files so as to avoid unwanted links in rdoc [ci skip]
2013-12-27 13:58:31 +05:30
Godfrey Chan
87323487ce
Merge pull request #13442 from aditya-kapoor/update-docs
...
Updated documentation for Attribute Methods [ci skip]
2013-12-26 02:02:53 -08:00
aditya-kapoor
1dae89ccce
Added Backslashes to ActiveModel::AttributeMethods to prevent unwanted links in the rdoc + some other doc fixes.[ci skip]
2013-12-25 18:34:11 +05:30
Robin Dupret
6e2d35df3c
Fix few typos and improve markup at some levels
2013-12-24 12:39:41 +01:00
Carlos Antonio da Silva
7530c82e82
Disable locale checks to avoid warnings in Active Model tests [ci skip]
...
Missed AMo when adding to the other components in
ae196e85ee7169700afac2eecdc276bc06b10b8d.
2013-12-23 17:51:07 -02:00
Robin Dupret
b894b7b90a
Fix few typos in the documentation [ci skip]
2013-12-21 18:59:55 +01:00
Vijay Dev
a3b1105ada
Merge branch 'master' of github.com:lifo/docrails
2013-12-20 00:10:30 +05:30
Akira Matsuda
a3ebe7f3a7
Unused classes in AMo tests
2013-12-19 18:31:11 +09:00
David Heinemeier Hansson
c0a2d474c5
Get ready to release 4.1.0.beta1
2013-12-17 16:05:28 -08:00
Tejas Dinkar
da2b05bb6b
Allows you to check if an attribute has changed to a particular value
...
model.name_changed?(from: "Pete", to: "Ringo")
2013-12-15 12:13:31 +05:30
Rafael Mendonça França
12affbe491
Fix typo [ci skip]
2013-12-13 18:33:30 -02:00
Rafael Mendonça França
b34352e425
Merge pull request #13255 from strzalek/bump-builder
...
Bump up builder
2013-12-12 12:22:21 -08:00
Godfrey Chan
f650981483
Added :nodoc: for attribute_changed?
and attribute_was
[ci skip]
...
These methods were made "public" in 47617ecd so that `method_missing`
can invoke them without going through `send`, but they aren't meant
for consumption from outside of Rails.
2013-12-12 12:04:07 -08:00
Łukasz Strzałkowski
9f506c494b
More liberal builder dependency
...
Allowing us to get 3.2.x versions if needed.
2013-12-12 20:03:02 +01:00
Akshay Vishnoi
5fccd77b6c
Spelling and Grammar checks
2013-12-12 18:28:34 +05:30
Yves Senn
6f3c3ba784
Merge pull request #13287 from aayushkhandelwal11/typo_rectified
...
typos rectified lifecycle => life cycle
2013-12-11 23:32:04 -08:00
Aayush khandelwal
10fffd7ae6
typos rectified lifecycle => life cycle
2013-12-12 12:55:35 +05:30
Rafael Mendonça França
5853c64a4b
Revert "Merge pull request #13276 from aayushkhandelwal11/change_to_key"
...
This will call primary_key two times
This reverts commit d0588a2e897d33c6c12e9fc5f8680328d37a26ca, reversing
changes made to 87e1e86640fb8b5a260ff7c0044aaae58fff2bc4.
2013-12-11 13:43:28 -02:00
Rafael Mendonça França
d0588a2e89
Merge pull request #13276 from aayushkhandelwal11/change_to_key
...
removing multiple check conditions to single check condition
2013-12-11 06:22:42 -08:00
Aayush khandelwal
1889dcbc9f
removing multiple check conditions to single check condition
2013-12-11 19:36:25 +05:30
Guillermo Iguaran
87e1e86640
Merge pull request #13273 from robertomiranda/test-remove-require
...
Remove require 'models/administrator', Administrator is not used in secure password test
2013-12-11 05:39:14 -08:00
robertomiranda
df7e5b69de
Remove require 'models/administrator', Administrator is not used in secure password test
2013-12-11 08:34:28 -05:00
aditya-kapoor
0c55335074
Merge branch 'master' of github.com:lifo/docrails
2013-12-10 11:44:07 +05:30
Carlos Antonio da Silva
05a685eeb7
Merge pull request #13145 from acapilleri/fix_email_example
...
fix email regex example code [ci skip]
2013-12-03 07:47:25 -08:00
Angelo capilleri
f590cdb656
fix email regex example code [ci skip]
...
different from the regex in EmailValidator
2013-12-03 16:44:39 +01:00
Lauro Caetano
b1b9a0aeca
Typos. return -> returns. [ci skip]
2013-12-03 13:31:36 -02:00
Genadi Samokovarov
6329d9fa8b
Remove deprecated cattr_* requires
2013-12-03 00:28:15 +02:00
Akshay Vishnoi
ef0f633c66
Typo and grammatical fixes [ci skip]
2013-12-02 19:35:02 +05:30
Yves Senn
7c6d99e81e
first pass through CHANGELOGS to extract 4_1_release_notes. [ci skip]
...
Extract **notable changes**, **deprecations** and **removals** from
each CHANGELOG.
I tried to reference the commits and pull requests for new features
and deprecations.
In the process I also made some minor changes to the CHANGELOGS.
The 4_1_release_notes guide is declared WIP.
2013-11-28 17:24:15 +01:00
Xavier Noria
17c29a0df0
Merge remote-tracking branch 'docrails/master'
...
Conflicts:
activesupport/lib/active_support/core_ext/hash/deep_merge.rb
activesupport/lib/active_support/core_ext/hash/keys.rb
2013-11-24 20:00:24 +01:00
Carlos Antonio da Silva
aa7fdfb859
Remove short circuit return in favor of simple conditional
2013-11-15 01:11:57 -02:00
Carlos Antonio da Silva
374d465f28
Invert conditional to avoid double checking for Regexp
2013-11-15 01:04:57 -02:00
Carlos Antonio da Silva
9014a79436
Only check that the option exists once instead of doing on each conditional
2013-11-15 01:01:59 -02:00
Carlos Antonio da Silva
61fef76106
Remove argument that is accessible as attribute
2013-11-15 01:00:53 -02:00
Carlos Antonio da Silva
b8c6c08452
Cache regexp source on format validation to avoid allocating new objects
...
Example:
>> r = /some-regexp/
=> /some-regexp/
>> r.source.object_id == r.source.object_id
=> false
2013-11-15 00:38:55 -02:00
Carlos Antonio da Silva
70161ae3b8
Make code simpler to read by using a case statement
2013-11-15 00:24:54 -02:00
Carlos Antonio da Silva
12815e0d44
Avoid a new hash allocation
2013-11-15 00:24:54 -02:00
Carlos Antonio da Silva
4c7e3a3087
Use a simple conditional rather than short circuit with next
2013-11-15 00:19:03 -02:00
Carlos Antonio da Silva
d2992818e0
Simplify number parsing logic in numericality validation
2013-11-15 00:07:22 -02:00
Carlos Antonio da Silva
f70e30ec6d
Avoid creation of extra hash with merge just to set a value
2013-11-15 00:07:22 -02:00
Prem Sichanugrist
efff6c1fd4
Change syntax format for example returned values
...
According to our guideline, we leave 1 space between `#` and `=>`, so we
want `# =>` instead of `#=>`.
Thanks to @fxn for the suggestion.
[ci skip]
2013-11-11 13:53:54 -05:00
Carlos Antonio da Silva
deaf285824
Merge pull request #12686 from kryzhovnik/master
...
Minor doc fix of ActiveModel::Naming. [ci skip]
Conflicts:
activemodel/lib/active_model/naming.rb
2013-11-02 14:46:56 -02:00
Andrey Samsonov
fb6f02c521
Minor doc fix of ActiveModel::Naming.
...
- qoute example line's result when it kind of String
- right ("singular_route_key") method in example
2013-10-29 15:23:03 +04:00
Guillermo Iguaran
c31b900221
Merge pull request #12635 from mperham/4-0-stable
...
Allow any version of BCrypt
2013-10-24 19:31:13 -02:00
Akira Matsuda
68db6bc431
Let validates_inclusion_of accept Time and DateTime ranges
...
fixes 4.0.0 regression introduced in 0317b93c17a46d7663a8c36edc26ad0ba3d75f85
2013-10-23 22:10:15 +09:00
T.J. Schuck
5d7b413d84
Use bcrypt's public cost attr, not internal constant
...
See:
- https://github.com/codahale/bcrypt-ruby/pull/63
- https://github.com/codahale/bcrypt-ruby/pull/64
- https://github.com/codahale/bcrypt-ruby/pull/65
2013-10-10 11:46:59 -04:00
Arun Agrawal
31488dba85
observers are not part of ActiveModel [ci skip]
2013-10-09 14:25:16 +02:00
Vijay Ubuntu
27576df810
adding load_path to include active_model in the load path of example
...
similar to activerecord/examples/simple.rb
2013-10-09 01:52:55 +05:30
Rafael Mendonça França
c48c111bb2
Merge pull request #8791 from griffinmyers/master
...
Updated DirtyModel's @changed_attributes hash to be symbol/string agnostic
Conflicts:
activemodel/CHANGELOG.md
2013-10-03 11:37:10 -03:00
T.J. Schuck
4a99e10199
bcrypt-ruby v3.1.2 supports Ruby 2.0 on Windows
2013-09-23 14:28:26 -04:00
Rafael Mendonça França
ed0b080cb3
Fix the documentation method.
...
It is reload! in the class definition.
[ci skip]
2013-09-23 11:25:43 -03:00
Rafael Mendonça França
7ef29140eb
No need to abbreviate ActiveModel
...
[ci skip]
2013-09-23 11:01:43 -03:00
Rafael Mendonça França
089e1b6426
Document reset_changes since it is part of public API
...
[ci skip]
2013-09-23 11:00:56 -03:00
Rafael Mendonça França
9aa1a3d853
Merge pull request #10816 from bogdan/less-dirty-dirty
...
Make AM::Dirty less dirty to plugin into AR or other library
2013-09-23 10:59:05 -03:00
Rajarshi Das
782d794c20
use assert_empty in activemodel conditional validation test cases
2013-09-10 17:26:39 +05:30
Rajarshi Das
e21a18bed0
fix actionview and activemodel test cases typos
2013-09-05 14:21:57 +05:30
aditya-kapoor
6b9b0767bf
Merge branch 'master' of github.com:lifo/docrails
2013-09-01 18:05:04 +05:30
Gaurish Sharma
65f1766a08
Add :nodoc: to ActiveModel::SecurePassword.min_cost
...
[ci skip]
2013-08-29 01:27:18 +05:30
Rajarshi Das
9f478deaab
remove unused instance variable
2013-08-23 16:04:08 +05:30
aditya-kapoor
b27c40637a
fixed a typo
2013-08-20 14:21:36 +05:30
Guillermo Iguaran
99e33c03b7
Dont' check for any order in hash since we aren't sorting it and this is determinated only by the used interpreter
2013-08-18 16:40:21 -05:00
Guillermo Iguaran
c40111c346
Refactor serialization test for hash order
2013-08-18 09:04:09 -05:00
Gaurish Sharma
90c450f6cd
Avoid Skip in test, have a unified test for order
2013-08-09 15:27:21 +05:30
Gaurish Sharma
9f8116fb77
Add tests for ActiveModel::Serializers::JSON#as_json ordering
2013-08-09 04:32:00 +05:30
Ryoji Yoshioka
23ef1dfd70
Fix: documentation for ActiveModel::Errors
2013-08-05 18:58:22 +09:00
Max Shytikov
af1e3b7c48
fix tests
2013-07-30 20:03:57 +03:00
Arun Agrawal
f52832de2a
grab executable from rubygems
...
As done here d7fc97d3f90c0e30865d32ce202658f03248cacc
2013-07-26 11:07:25 +02:00
Vladimir Kiselev
3be0cdfa55
Fix secure_password password_confirmation validations
2013-07-24 03:14:15 +04:00
Burkhard Vogel-Kreykenbohm
ad62cf68f8
bcrypt-ruby stable is 3.1
2013-07-17 16:39:07 +02:00
John Gesimondo
0e945f8909
it's xml, not json
...
change docs for xml serializer to talk about xml
2013-07-13 16:25:04 -07:00
Ankit Gupta-FIR
6a71d09ad2
Replaced older rocket sign to new :
2013-07-04 17:25:50 +01:00
Aaron Patterson
09b31f08d4
eagerly initialize the attributes module to avoid check-then-set race conditions
2013-07-02 14:34:40 -07:00
Aaron Patterson
4c88f4ce16
remove wrong documentation from a :nodoc:'d method
2013-07-02 14:04:40 -07:00
Aaron Patterson
d094aaad19
the data structure used to store attribute aliases should not be exposed
2013-07-01 16:23:08 -07:00
Vipul A M
404a61e19c
Remove redundant escapes from xml serialization test
2013-07-01 10:17:33 +05:30
Steven Yang
6e583cdac3
fix typo in ActiveModel::Error docs [ci skip]
2013-06-30 18:38:29 -03:00
Steven Yang
5fe43ffcfb
remove evals from AM::Validations::Callbacks
...
follow the same refactor at a63a964a5d1ed02cf0df1b1a33a96ed2a9fa987b
2013-06-30 18:47:55 +08:00
Steven Yang
e8fe6660d2
provide a more sementicthe local variables name for ActiveModel::Validations::Clusivity#include? method
...
the original name `exclusion` is a bit confusing when using with the method `inclusion_method`
rename it to a more logic neutral name.
2013-06-29 18:36:40 +08:00
Paul Nikitochkin
e63ba910ae
Remove deprecation warning from AttributeMethodsMatcher
2013-06-28 00:16:42 +03:00
Łukasz Strzałkowski
468939297d
Remove deprecated attr_protected/accessible
...
Rails 4.0 has removed attr_protected and attr_accessible feature in favor of Strong Parameters.
2013-06-27 20:38:30 +02:00
Carlos Antonio da Silva
48ab2c06e0
Merge pull request #11054 from senny/11048_make_default_value_explicit
...
make default value for `:message` on `AM::Errors` explicit.
2013-06-27 05:16:38 -07:00
Carlos Antonio da Silva
61346d1b42
Merge pull request #10774 from chuckbergeron/validates-inclusion-of-accuracy-for-non-numeric-ranges
...
Greater accuracy for validates_inclusion_of on non-numeric ranges
Closes #10774 , fixes #10593
2013-06-25 21:48:41 -03:00
Akshay Khole
444d3412b9
Fixing Issue #11083
...
Removing other occurrences of `the` appearing twice
2013-06-25 16:47:29 +05:30
Rajarshi Das
cbd4a2e317
replace all older rocket sign to new ":" from examples of active record and active models
2013-06-24 11:19:51 +05:30
José Valim
e1f4f64434
Revert "Merge pull request #11053 from yangchenyun/mine"
...
Those two files are required by active_support/rails.rb
loaded in active_model.rb
It is common to require common dependencies on the root
files to avoid boilerplate in each file.
This reverts commit 763635e30f17800ebc0a8ae98d780edc8ebfb4e5, reversing
changes made to 4f46ef36aaef217834f3f96d3689d32f6a6761ea.
2013-06-22 18:36:26 +02:00
Yves Senn
ca99ab2481
make default value for :message
on AM::Errors
explicit.
2013-06-22 13:48:42 +02:00
Yves Senn
763635e30f
Merge pull request #11053 from yangchenyun/mine
...
Add explicit dependencies of ActiveSupport to enable independent usage of ActiveModel::Name
2013-06-22 03:32:15 -07:00