Commit Graph

152 Commits

Author SHA1 Message Date
Aaron Patterson
5145e98e53 stop messing with the load path, load path should be adjusted in the test task 2011-08-26 10:15:08 -07:00
Jon Leighton
d90b4e2615 Rewrote AssociationPreload. 2011-02-28 22:12:34 +00:00
Prem Sichanugrist
839d06f5f2 We're in 2011, let's update our license
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-22 18:24:20 -02:00
Emilio Tagua
8ee0b44148 Merge remote branch 'rails/master' into identity_map
Conflicts:
	activerecord/examples/performance.rb
	activerecord/lib/active_record/association_preload.rb
	activerecord/lib/active_record/associations.rb
	activerecord/lib/active_record/associations/association_proxy.rb
	activerecord/lib/active_record/autosave_association.rb
	activerecord/lib/active_record/base.rb
	activerecord/lib/active_record/nested_attributes.rb
	activerecord/test/cases/relations_test.rb
2011-02-15 12:01:04 -03:00
Aaron Patterson
3cc2b77dc1 adding a YAML Column coder for YAML serialization to db columns 2011-02-01 14:25:46 -08:00
Emilio Tagua
86699339bc Weakling is only required for JRuby. 2010-11-19 19:08:28 -03:00
Marcin Raczkowski
3df4460a74 IdentityMap - Adding Weakling and IM Base as concern 2010-11-19 19:03:56 -03:00
wycats
cc8e386d08 Always pull in version for frameworks (standardize autoload / require / none) 2010-10-10 16:12:04 -07:00
Aaron Patterson
45edeed1ee Arel::Sql::Engine.new does not do anything anymore 2010-09-30 16:28:12 -07:00
Josh Kalderimis
4b66aab00f mass_assignment_security moved from AR to AMo, and minor test cleanup
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-08 18:28:45 +02:00
Eric Chapweske
606088df3f Mass assignment security refactoring
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-08 18:28:32 +02:00
wycats
d916c62cfc eliminate alias_method_chain from ActiveRecord 2010-05-09 02:37:52 +03:00
Xavier Noria
6be04c4631 i18n -> AS/i18n 2010-04-14 02:30:02 -07:00
Xavier Noria
dd635ec701 adds missing requires for arel and i18n, prevents Arel constant from being autoloaded (which was still seen), though it probably hides an issue related to dependencies 2010-04-14 02:01:55 -07:00
wycats
4aded43b73 Replace the placeholder base_hook API with on_load. To specify some code that
should run during framework load do:

ActiveSupport.on_load(:action_controller) do
  # Code run in the context of AC::Base
end
2010-03-29 17:08:50 -07:00
wycats
39d6f9e112 Make many parts of Rails lazy. In order to facilitate this,
add lazy_load_hooks.rb, which allows us to declare code that
should be run at some later time. For instance, this allows
us to defer requiring ActiveRecord::Base at boot time purely
to apply configuration. Instead, we register a hook that should
apply configuration once ActiveRecord::Base is loaded.

With these changes, brings down total boot time of a
new app to 300ms in production and 400ms in dev.

TODO: rename base_hook
2010-03-07 06:24:30 -08:00
Carlhuda
24ab5665b2 Revert "Fix test load paths for those not using bundler"
This reverts commit eec2d301d4.

This commit broke tests. You cannot have a file called "bundler" on the load path.
2010-02-23 17:31:17 -08:00
Joshua Peek
eec2d301d4 Fix test load paths for those not using bundler 2010-02-15 10:20:11 -06:00
Pratik Naik
dc3cc6c608 Move batch finders to Relation 2010-02-12 22:31:03 +00:00
Mikel Lindsaar
65ad16568c Updating copyright dates on all licenses 2010-02-01 10:10:53 +11:00
Joshua Peek
db49c706b6 Axe AM state machine
We're going do it eventually, get it done before 3.0 is final.
2010-01-30 18:38:01 -06:00
Pratik Naik
6d30002a52 Revert "Refactoring attributes/types" [#3348 state:open]
This reverts commit f936a1f100.

Conflicts:

	activerecord/lib/active_record.rb
	activerecord/lib/active_record/base.rb

Revert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open]

This reverts commit 2831996483.

Reason :

  It's not generating attribute methods properly, making object.column 5x slower.
2010-01-22 02:37:07 +05:30
Pratik Naik
9465b84b54 Rename CalculationMethods to Calculations and get rid of the old Calculations module 2010-01-19 22:17:33 +05:30
Joshua Peek
e5ed62deea Autoload AR test case 2010-01-04 16:50:01 -06:00
Pratik Naik
8edfa8f82f Move Relation#spawn and Relation#merge to a separate module 2010-01-03 18:57:57 +05:30
Pratik Naik
3c23b71a09 Move predicate building to a stand alone PredicateBuilder class 2010-01-01 04:17:55 +05:30
Jeremy Kemper
10a2638db0 Fix up AR extension by using Railties module instead of Rails and requiring ControllerRuntime at initialization time instead of boot 2009-12-30 19:24:00 -08:00
Pratik Naik
7aabaac0f5 Organize Relation methods into separate modules 2009-12-30 19:29:26 +05:30
Pratik Naik
e8ca22d129 Move Relation calculation methods to a separate module 2009-12-28 19:12:15 +05:30
José Valim
97db79ab3c Remove ActiveRecord runtime logging from ActionPack and place in ActiveRecord, adding it through config.action_controller.include hook. 2009-12-27 13:32:40 +01:00
Joshua Peek
ace20bd25e Flip deferrable autoload convention 2009-12-22 17:27:37 -06: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
Jeremy Kemper
2767036392 Use bundled env for tests only 2009-10-19 19:00:48 -07:00
Eric Chapweske
f936a1f100 Refactoring attributes/types [#3348 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-10-17 12:37:15 -05:00
Jeremy Kemper
6be5f45019 Fix env path 2009-10-14 19:30:06 -07:00
Jeremy Kemper
9c52f96acb Include bundled env in toplevel require, if present 2009-10-14 19:15:33 -07:00
Jeremy Kemper
df55781458 No more toplevel arel sibling 2009-10-14 19:05:06 -07:00
Emilio Tagua
0e2fbd80e2 Merge commit 'rails/master'
Conflicts:
	activerecord/lib/active_record/calculations.rb
	activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
	activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
2009-08-10 18:07:33 -03:00
Jeff Dean
22f3398253 Introduce validates_with to encapsulate attribute validations in a class.
[#2630 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 22:47:56 -07:00
Emilio Tagua
ae175a5354 Merge commit 'rails/master' 2009-08-05 14:52:07 -03:00
Joshua Peek
aad5a30bf2 Add simple support for ActiveModel's StateMachine for ActiveRecord 2009-08-04 11:03:57 -05:00
Emilio Tagua
3de59e916d Merge commit 'rails/master'
Conflicts:
	activerecord/lib/active_record/associations.rb
2009-07-31 16:21:07 -03:00
Joshua Peek
62fd1d3716 Start separating primary key concerns 2009-07-30 17:54:02 -05:00
Joshua Peek
c2b075bed0 Concernify AR AttributeMethods 2009-07-30 17:53:59 -05:00
Pratik Naik
e033b5d037 Merge docrails 2009-07-25 16:03:58 +01:00
Emilio Tagua
0e0866e056 Introduced ActiveRecord::Relation, a layer between an ARel relation and an AR relation 2009-07-21 20:21:03 -03:00
Emilio Tagua
a924b2f66e Merge commit 'rails/master' 2009-06-12 16:20:27 -03:00
Joshua Peek
4d70359200 Integrate ActiveModel::Observing into ActiveRecord 2009-06-10 23:36:44 -05:00