José Valim
6b099975fa
No need to symbolize these.
2010-12-27 09:30:36 +01:00
Aaron Patterson
207f266cca
define_attr_method must serialize nil correctly
2010-12-20 19:47:15 -08:00
Xavier Noria
880f8419c4
Merge branch 'master' of git://github.com/lifo/docrails
2010-12-20 20:13:34 +01:00
Santiago Pastorino
ab2bde45f8
Remove require AS::Concern from places where is already in
2010-12-19 19:15:26 -02:00
Santiago Pastorino
5fb42ac478
Tests and docs which explain the use of validate with a block and without arguments
2010-12-19 18:50:18 -02:00
Santiago Pastorino
08ccd29b5b
Remove weak_passwords list and the length/strong password validator, leave that up to the programmer
2010-12-19 15:01:29 -02:00
José Valim
6d80f3a1ba
Use class_attribute to ensure weak_passwords are inheritable.
2010-12-19 13:31:48 +01:00
Mikel Lindsaar
6c217f98db
Add set_weak_passwords call in alignment with set_table_name.
2010-12-19 21:36:47 +11:00
Mikel Lindsaar
fa14df08a8
Fix incorrect docs
2010-12-19 20:54:15 +11:00
Mikel Lindsaar
a39a333769
Added ability to specify which passwords you want as weak passwords
2010-12-19 20:39:54 +11:00
José Valim
863de37b05
'unsecure' => 'insecure'
2010-12-19 09:37:08 +01:00
José Valim
432556b923
Make password messages translatable.
2010-12-19 09:34:31 +01:00
José Valim
b8f6dd8cbb
Add missing require and remove extra module.
2010-12-19 09:31:26 +01:00
José Valim
d592fa946d
Avoid warnings and fix small typo on SecurePassword.
2010-12-19 09:28:15 +01:00
David Heinemeier Hansson
bd9dc4ff23
BCrypt does its own salting, lovely!
2010-12-18 19:09:07 -08:00
David Heinemeier Hansson
39b5ea6e01
Switch from SHA2 to BCrypt (easy Windows compatibility is coming shortly with new compiled gem)
2010-12-18 15:39:32 -08:00
David Heinemeier Hansson
bcf4e4f2b0
Added ActiveRecord::Base#has_secure_password (via ActiveModel::SecurePassword) to encapsulate dead-simple password usage with SHA2 encryption and salting
2010-12-18 13:38:05 -08:00
Akira Matsuda
a3fbbb626f
'nil' => nil
2010-12-17 14:37:22 +09:00
Samuel Kadolph
972011a2e5
Add support for namespaced validators
...
Includes test and documentation for new feature
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-12-16 01:49:28 +05:30
Samuel Kadolph
2650742bd0
Add support for namespaced validators
...
Includes test and documentation for new feature
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-12-11 16:35:18 -02:00
Xavier Noria
c6612d2bb3
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
activerecord/lib/active_record/transactions.rb
2010-12-11 00:55:25 +01:00
Ryan Bigg
b4ec6f0d39
Move ActiveModel::Lint::Tests documentation to be above module declaration so it appears in the API docs for this module.
2010-12-09 18:16:18 +10:00
Mike Dvorkin
f572a02b94
Take into account current time zone when serializing datetime values [ #6096 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-09 09:01:49 +01:00
Santiago Pastorino
33b0a30fcc
default could be a symbol here so attribute.to_s.humanize should be the final option
2010-12-05 12:57:45 -02:00
Santiago Pastorino
3ab98cf6e0
If default is provided don't add attribute.to_s.humanize to the options
2010-12-05 12:36:56 -02:00
Xavier Noria
48386d245b
Merge branch 'master' of git://github.com/lifo/docrails
2010-12-05 10:33:50 +01:00
Santiago Pastorino
acbabd9626
Don't compute this string again
2010-12-02 15:43:12 -02:00
Thilo Utke
7148b933c4
ActiveModel::Errors.to_hash returns plain OrderedHash and used in to_json serialization to properly handle multiple errors per attribute [ #5615 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-01 11:43:37 +01:00
José Valim
1ec126dd37
Revert "Fix generation of wrong json string when field has multiple errors"
...
This reverts commit a9b666b51d .
2010-12-01 11:42:30 +01:00
Krekoten' Marjan
a9b666b51d
Fix generation of wrong json string when field has multiple errors
2010-12-01 00:03:42 +08:00
Aditya Sanghi
04922bafda
grammar fix
2010-11-27 19:56:08 +05:30
Carl Lerche
ccd2f3ede5
Update the version.rb files to include a PRE part
2010-11-16 17:19:46 -08:00
Robert Pankowecki
88688cdd8e
Fix when database column name has some symbolic characters. [ #5818 state:resolved]
2010-11-14 17:24:31 +08:00
snusnu
973b908777
Added missing AS require to active_model/naming.rb
...
We saw a failing spec when running the DataMapper
ActiveModel compliance specs for dm-active_model.
ActiveModel::Naming#model_name
relies on the Module#parents method defined in
active_support/core_ext/module/introspection.rb
Adding the appropriate require statement of course
fixed our specs.
2010-10-30 00:20:31 +08:00
wycats
cc8e386d08
Always pull in version for frameworks (standardize autoload / require / none)
2010-10-10 16:12:04 -07:00
Xavier Noria
db520042b3
Merge branch 'master' of git://github.com/lifo/docrails
2010-10-06 23:16:13 +02:00
Ernie Miller
33aaa15f62
Convert to model before calling model_name on a record in ActiveModel::Naming
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-10-04 21:26:41 +02:00
fastred
4ea9a8d9ad
Fix syntax error in ActiveModel::Validations .validate example
2010-10-01 18:32:46 +02:00
José Valim
fe0251e408
Merge remote branch 'miloops/warnings'
...
Conflicts:
actionpack/lib/action_controller/metal/url_for.rb
2010-09-27 21:00:54 +02:00
thedarkone
9c57bd8578
Fix Namind#model_name.
2010-09-27 17:46:00 +02:00
Emilio Tagua
be9883b09d
Don't redefine existing attributes accessors.
2010-09-27 11:19:19 -03:00
John Firebaugh
75a960ca6e
Don't act destructively on ActiveModel::Name#human options hash. [ #5366 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 10:59:54 +02:00
Rodrigo Rosenfeld Rosas
8d30193b08
Properly interpolate i18n keys in modules [ #5572 state:resolved]
2010-09-24 20:41:12 +02:00
Obie Fernandez
275f922a23
Better shortcut options for custom validators [ #5672 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 12:49:16 +02:00
Xavier Noria
8c0c815ba7
resolves rdoc conflict
2010-09-23 22:35:08 +02:00
Emilio Tagua
dc2f26ca38
Perf: refactor methods using inject when not need in activemodel.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-22 18:08:03 -03:00
Neeraj Singh
8ae913664f
remove irrelevant comments
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-18 20:33:40 +02:00
Alexey Mahotkin
dfebdb1b03
Tiny fixes to rdoc
2010-09-16 17:10:36 +04:00
Mikel Lindsaar
bca9b84a4a
Fixing documentation to reflect deprecated add_to_base
2010-09-12 14:19:38 +10:00
Jeremy Kemper
d79b1aa0ba
Fewer object allocations
2010-09-09 14:37:58 -07:00