1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

32 commits

Author SHA1 Message Date
José Valim
6d390671f6 Move ActiveRecord callbacks implementation to ActiveModel and make use of it.
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
2009-12-28 16:19:23 -08:00
Jeremy Kemper
632df063a3 Merge commit 'josevalim/validations' 2009-12-28 11:13:35 -08:00
Jeremy Kemper
292363c75f Use i18n 2009-12-27 15:17:44 -08:00
José Valim
74098e4cb6 No need to use ValidationsRepairHelper hack on ActiveModel anymore, Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there. 2009-12-23 13:30:58 +01:00
José Valim
279067639f validates_each uses a BlockValidator. 2009-12-23 01:38:15 +01:00
José Valim
f1085f4128 Move validations in ActiveModel to validators, however all validatity checks are still in the class method. 2009-12-23 00:36:51 +01:00
Joshua Peek
7ee5843c3c Fully expand relative rails framework paths and make sure we aren't
adding any to the load path more than once.
2009-12-16 11:56:51 -06:00
Carlhuda
c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
José Valim
e714b499cc Move validator, human_name and human_attribute_name to ActiveModel, remove deprecated error messages and add i18n_scope and lookup_ancestors.
Signed-off-by: Carl Lerche <carllerche@mac.com>
2009-10-20 17:52:32 -07:00
Joshua Peek
66d713fc8f License, version, and gemspec for ActiveModel. Ship it! 2009-08-31 19:09:16 -05:00
Yehuda Katz
dbf20c2dbb Initial AMo Lint implementation 2009-08-29 01:49:18 -05:00
Joshua Peek
c6bc8e6626 Break up concerns for choosing what attributes should be serialized and the actual serializer 2009-08-13 22:27:36 -05:00
Joshua Peek
f97dae5ebe Extract common dirty tracking methods in AMo 2009-08-10 13:51:48 -05:00
Joshua Peek
f8d3c72c39 Extract generic attribute method generation to AMo 2009-08-04 23:36:05 -05:00
Joshua Peek
92c00d7586 AMo conversion helper 2009-07-21 00:51:57 -05:00
Joshua Peek
6944b391cd Kill AMo Base 2009-07-21 00:13:26 -05:00
Joshua Peek
2685d93b07 Kill AMo ivar attributes helper 2009-07-20 23:28:58 -05:00
Yehuda Katz
5ffaaa71d1 Define ActiveModel API Compliance
- Define to_model on AR
  - Define to_model on ActiveModel::APICompliant
  - Update test fixtures to be API Compliant
  - Start using to_model in AP
2009-07-20 00:27:04 +09:00
Joshua Peek
d2b78b3594 Initial extraction of AMo xml serializer 2009-07-03 21:38:14 -05:00
Joshua Peek
fbdf706fff Add basic JSON serializer to AMo 2009-06-17 21:27:54 -05:00
Joshua Peek
af5301089f Add simple attribute implementation backed by ivars 2009-06-17 21:27:54 -05:00
Joshua Peek
1c4d28ba31 Move model naming into ActiveModel 2009-06-17 10:37:39 -05:00
Joshua Peek
4d70359200 Integrate ActiveModel::Observing into ActiveRecord 2009-06-10 23:36:44 -05:00
Joshua Peek
01515f8ecd Fix activesupport path 2009-06-08 19:59:56 -05:00
Joshua Peek
69742ca8fa Merge branch 'master' into active_model
Conflicts:
	activemodel/lib/active_model/core.rb
	activemodel/test/cases/state_machine/event_test.rb
	activemodel/test/cases/state_machine/state_transition_test.rb
	activerecord/lib/active_record/validations.rb
	activerecord/test/cases/validations/i18n_validation_test.rb
	activeresource/lib/active_resource.rb
	activeresource/test/abstract_unit.rb
2009-05-29 16:06:21 -05:00
Pratik Naik
08a99d0eac Add I18n translations to ActiveModel and move more AR specific parts to ActiveRecord::Validations 2009-03-20 21:45:13 +00:00
Pratik Naik
78c9791729 ActiveModel.load_all! isn't really needed at this point 2009-03-20 18:02:50 +00:00
Pratik Naik
5b1a1bf5bf Make Active Model test suite similar to Active Record 2009-03-20 10:32:24 +00:00
Pratik Naik
93e2d378df Autload ActiveModel::Observing 2009-03-20 01:13:24 +00:00
Pratik Naik
8828b2ca67 Move all the Active Record validations to Active Model 2009-03-19 23:28:59 +00:00
rick
b7c6ceff9a tweak activemodel load order a bit 2008-06-27 23:29:47 -07:00
Rick Olson
5dc3f91832 initial experimental commit of active_model
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-09 14:59:15 +00:00