Commit Graph

1261 Commits

Author SHA1 Message Date
Carlos Antonio da Silva
09c55dcc5d Review some tests from AMo::Errors to remove "should" usage
Also remove duplicated tests for Errors#as_json and minor improvements
in some tests.
2013-03-30 15:04:09 -03:00
Carlos Antonio da Silva
3d0c0c6c95 Improve changelog entry for ActiveModel::Errors#full_messages_for [ci skip]
Add a working example of how to use this new method.
2013-03-30 14:38:13 -03:00
Vijay Dev
6d8c070821 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
	activerecord/test/cases/adapter_test.rb
	guides/source/testing.md

[ci skip]
2013-03-30 15:46:14 +05:30
Rafael Mendonça França
b8b3df0e63 Merge pull request #8527 from shockone/patch-1
Add a method full_messages_for to the Errors class
2013-03-25 09:04:25 -07:00
Rafael Mendonça França
ba012fa04d Merge pull request #9864 from vipulnsward/fix_test_AR_v2
Introduce test on Error#full_message for attribute with underscores; Fix...
2013-03-25 08:56:29 -07:00
shock_one
ec1b715b0e Add a method full_messages_for to the Errors class 2013-03-24 09:38:28 +02:00
Rafael Mendonça França
e600384515 Merge pull request #8501 from charliesome/version-to-s
Add #to_s method to VERSION modules
2013-03-23 18:51:16 -07:00
Prathamesh Sonpatki
5f59317ec6 Fixed typo in activemodel/CHANGELOG 2013-03-24 02:27:43 +05:30
Prathamesh Sonpatki
33d1e37408 Reverted change in activemodel/CHANGELOG.md introduced by d45145acdc576e46a1f1719d69bec96b5bf07b0a 2013-03-24 02:14:21 +05:30
Prathamesh Sonpatki
d45145acdc Changed 'args' to 'arguments' when used in places other than code with fixing few more typos 2013-03-24 00:34:06 +05:30
Carlos Antonio da Silva
a03ab8cef8 Remove exception variable from rescue block
Just raising from the rescue block will re-raise the exception, so the
variable is not necessary.
2013-03-22 14:00:06 -03:00
Vipul A M
24fee97581 Add Error#full_message test; Fix typos
Introduce test on Error#full_message for attribute with underscores; Fix
some typos
2013-03-22 14:53:32 +05:30
robertomiranda
7e07b7bb5d Change Standard error when is required bcrypt-ruby and fails 2013-03-21 22:52:42 -05:00
Charlie Somerville
c07e1515f7 Add version method to top level modules 2013-03-21 19:56:07 +11:00
Intrepidd
9c025ab6e9 Tidying up some require : removing useless sort and homogenizing with the rest of the code the wat the includes are done 2013-03-20 18:24:48 +00:00
wangjohn
3ee30ca44a The repair_validations helper was not working correctly before because
it only cleared the validations that created :validate callbacks. This
didn't include the validates created by validates_with, so I've added a
method to clear all validations.
2013-03-19 12:23:20 -04:00
Xavier Noria
ddd2c75b26 Revert "instruct RDoc to only parse Ruby files under lib [Fixes #9779]"
This reverts commit c24528fbc94dea9946a563be3bed9559583bdc57.
2013-03-18 21:19:47 +01:00
Xavier Noria
c24528fbc9 instruct RDoc to only parse Ruby files under lib [Fixes #9779] 2013-03-18 20:36:32 +01:00
Vipul A M
233737706c fix some typos found in activemodel 2013-03-18 17:20:05 +05:30
Vipul A M
29dcf096b0 Small typos here and there. 2013-03-15 11:55:03 +05:30
Waynn Lue
008fd54e74 clarify verbiage 2013-03-12 18:44:10 -07:00
Carlos Antonio da Silva
b3a31e9363 Fix AMo code example indent, add missing author to entry [ci skip] 2013-03-09 14:57:31 -03:00
Rafael Mendonça França
cf09ac380e Merge pull request #9545 from senny/9535_secure_password_blank
`has_secure_password` is not invalid when assigning empty Strings
2013-03-07 08:05:05 -08:00
Vijay Dev
6ea48ebfa6 Merge branch 'master' of github.com:lifo/docrails 2013-03-05 22:51:48 +05:30
Yves Senn
8c1687bbf8 has_secure_password is not invalid when assigning empty Strings.
Closes #9535.

With 692b3b6 the `password=` setter does no longer set blank passwords.
This triggered validation errors when assigning empty Strings to `password`
and `password_confirmation`.

This patch only sets the confirmation if it is not `blank?`.
2013-03-04 18:56:05 +01:00
Yves Senn
b501ee47fa validates_confirmation_of does not override writer methods. 2013-03-04 18:51:34 +01:00
Lebin Sebastian F
50b3b968d4 Small Typo 2013-03-04 13:23:23 +05:30
Rafael Mendonça França
0f75e2c51f Update CHANGELOGS 2013-02-26 13:45:57 -03:00
David Heinemeier Hansson
c0bc9ce38c Preparing for 4.0.0.beta1 release 2013-02-25 08:31:50 -06:00
Xavier Noria
05857ec30e did a pass over the AM changelog [ci skip] 2013-02-24 20:37:15 +01:00
Angelo capilleri
40c1ee8b7d added more accurate test for add_on_empty
with the current tests, if delete the assignment of is_empty in add_on_empty method
the tests not fail. With this test, if we delete is_empty, the test fails
2013-02-19 18:48:37 +01:00
Vijay Dev
0c145448c4 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	guides/source/upgrading_ruby_on_rails.md
2013-02-15 22:06:17 +05:30
Henrik Nyh
53c22e097a Clarify ActiveModel::Validator initialization in docs.
As discussed with @josevalim on Ruby Rogues Parley.
2013-02-09 15:54:14 +01:00
Rafael Mendonça França
e16110c4b8 Take care of whitespaces and changing the hash syntax 2013-02-04 09:59:22 -02:00
David
6e2cba1c8b test for issue 8931 2013-02-02 13:00:52 +08:00
Akira Matsuda
ee4a2bb23d Missing require extract_options 2013-01-31 23:45:36 +09:00
Attila Domokos
69b6129fd4 Adding the route_key and param_key tests
This way all the tests are testing the same fields
2013-01-22 22:13:43 -05:00
Guillermo Iguaran
8aebe30ef4 Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by"
This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing
changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
2013-01-18 09:15:19 -05:00
robertomiranda
7baecc4802 User Rails 4 find_by 2013-01-18 07:56:05 -05:00
Carlos Antonio da Silva
203f787321 Merge pull request #8940 from adomokos/adding_tests_for_changed_attributes
Cleaning up ActiveModel::Dirty tests
2013-01-15 13:02:57 -08:00
Attila Domokos
63333e600f Cleaning up ActiveModel::Dirty tests
* Clarifying what the #changed method returns
* Adding tests to describe what the #changed_attributes returns
* Updating test name based on pull request comment
* Moving the test lower in the file per pull request comment
2013-01-15 10:24:57 -05:00
Trung Lê
86c4fe8191 ActiveRecord <-> Active Record [ci skip] 2013-01-15 10:52:02 +00:00
Yves Senn
bc19c0d09c test for ActiveModel::Conversion#to_partial_path and namespaced models 2013-01-14 21:17:22 +01:00
Attila Domokos
01434a5ee6 Adding tests for ActiveModel::Model
* Verifying persisted? is false when Model initialized
* Passing nil to Model should not blow up
* Changing test name to the one suggested in pull request comment
2013-01-12 20:04:24 -05:00
Attila Domokos
7171f9cc8f Covering untested methods for ActiveModel::Errors 2013-01-10 21:41:35 -05:00
Irio Irineu Musskopf Junior
d4f46ee4fd Set default value to ActiveModel::Validator initializer attribute
Makes it easier to test its objects.
2013-01-09 13:50:27 -02:00
Vijay Dev
f049016cd3 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	guides/source/getting_started.md
2013-01-09 01:04:15 +05:30
Gosha Arinich
0acf92184d prefer american spelling of 'behavior' 2013-01-07 11:47:27 +03:00
Akira Matsuda
3c21237c37 Reduce number of Strings a bit 2013-01-07 07:37:23 +09:00
Akira Matsuda
c8e632bd9f Namespace HashWithIndifferentAccess 2013-01-07 07:37:23 +09:00