Pratik Naik
5f3f100ce2
Merge branch 'master' into active_model
...
Conflicts:
activeresource/lib/active_resource/validations.rb
2009-04-22 15:26:03 +01:00
Alex Pooley
504d16ccdf
Add microsecond support for sqlite adapter [ #1982 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-21 18:05:07 +01:00
Pratik Naik
2e6d1bf43e
Change table to prevent copying indexes on sqlite2
2009-04-21 13:28:49 +01:00
Pratik Naik
2381f6f3dc
Specify :group with the table name for it to work on sqlite3
2009-04-21 13:11:56 +01:00
Pratik Naik
6513dde490
Fix tests for sqlite3 3.6.xx
2009-04-21 13:06:26 +01:00
Max Lapshin
f3ac4f387d
Fixed dumping from postgresql columns in index in wrong order. [ #2515 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:44:13 +01:00
Scott Woods
64b33b6cf9
Quote table names when casting to regclass so that capitalized tables are supported. [ #2418 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:43:38 +01:00
Max Lapshin
cdcd638c2f
Fixed wrong quoting of index names in postgres [ #2402 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:42:40 +01:00
Pratik Naik
de0ea38663
Ensure :dependent => :delete_all works for association with hash conditions
2009-04-20 18:12:40 +01:00
Pratik Naik
489abfd3b2
Ensure JoinAssociation uses aliased table name when multiple associations have hash conditions on the same table
2009-04-20 13:51:11 +01:00
David Heinemeier Hansson
abb899c54e
Added :touch option to belongs_to associations that will touch the parent record when the current record is saved or destroyed [DHH]
2009-04-16 17:25:55 -05:00
David Heinemeier Hansson
fdb61f02c5
Added ActiveRecord::Base#touch to update the updated_at/on attributes with the current time [DHH]
2009-04-16 16:48:37 -05:00
Carl Lerche & Yehuda Katz
906aebceed
Bring abstract_controller up to date with rails/master
...
Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list
of commits that could not be applied cleanly or are obviated with the
abstract_controller refactor. They all need to be revisited to ensure
that fixes made in 2.3 do not reappear in 3.0:
2259ecf368
AR not available
* This will be reimplemented with ActionORM or equivalent
06182ea02e
implicitly rendering a js response should not use the default layout
[#1844 state:resolved]
* This will be handled generically
893e9eb995
Improve view rendering performance in development mode and reinstate
template recompiling in production [#1909 state:resolved]
* We will need to reimplement rails-dev-boost on top of the refactor;
the changes here are very implementation specific and cannot be
cleanly applied. The following commits are implicated:
199e750d46
3942cb406e
f8ea9f85d4
e3b166aab3
ae9f258e03
44423126c6
0cb020b4d6
workaround for picking layouts based on wrong view_paths
[#1974 state:resolved]
* The specifics of this commit no longer apply. Since it is a two-line
commit, we will reimplement this change.
8c5cc66a83
make action_controller/layouts pick templates from the current instance's
view_paths instead of the class view_paths [#1974 state:resolved]
* This does not apply at all. It should be trivial to apply the feature
to the reimplemented ActionController::Base.
87e8b16246
fix HTML fallback for explicit templates [#2052 state:resolved]
* There were a number of patches related to this that simply compounded
each other. Basically none of them apply cleanly, and the underlying
issue needs to be revisited. After discussing the underlying problem
with Koz, we will defer these fixes for further discussion.
2009-04-13 15:18:45 -07:00
Max Lapshin
70de8e64e3
Support multiple schemas in table names for postgresql [ #390 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-05 12:36:36 +01:00
Pratik Naik
632bbbfe1c
Merge docrails
2009-04-05 12:36:36 +01:00
Luca Guidi
42cdc7571d
Ensure SqlBypass use ActiveRecord::Base connection
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#https://rails.lighthouseapp.com/attachments/106066/0001-Ensure-SqlBypass-use-ActiveRecord-Base-connection.patch state:committed]
2009-04-05 21:00:50 +12:00
Pratik Naik
f97832b1e4
Merge docrails
2009-03-24 12:15:43 +00:00
Pratik Naik
d758d996d1
Deprecate Model#validate/validate_on_create/validate_on_update. Use Model.validate :method and likewise
2009-03-21 19:07:15 +00:00
Pratik Naik
320933205e
Deprecate Errors#on_base/add_to_base/invalid?/each_full
2009-03-21 18:34:05 +00:00
Pratik Naik
22ad30ed60
Move validate_on_create and validate_on_update from ActiveModel to ActiveRecord
2009-03-21 01:11:38 +00:00
Pratik Naik
6173e5bfae
Add ActiveModel::Validations tests for regular ruby classes
2009-03-20 22:21:27 +00: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
cc5e019f6b
Include ActiveModel::Validations from ActiveRecord::Validations
2009-03-20 19:12:18 +00:00
Pratik Naik
37283a6aae
Deprecate Error#on(attribute) in favour of Errors#[attribute]
2009-03-20 17:36:22 +00:00
Pratik Naik
60756ad4ec
Move relevant validation tests from Active Record to Active Model
2009-03-20 15:07:49 +00:00
Pratik Naik
5b1a1bf5bf
Make Active Model test suite similar to Active Record
2009-03-20 10:32:24 +00:00
Pratik Naik
77acfefedf
Make Active Resource use ActiveModel::Errors
2009-03-19 23:45:08 +00:00
Pratik Naik
638333b7a1
Move uniqueness and association validations to Active Record
2009-03-19 23:44:30 +00:00
Pratik Naik
8828b2ca67
Move all the Active Record validations to Active Model
2009-03-19 23:28:59 +00:00
Pratik Naik
18eb80ccc7
Merge docrails
2009-03-16 11:28:36 +00:00
David Heinemeier Hansson
73fc42cc0b
Prepare for final 2.3 release
2009-03-15 22:06:50 -05:00
Jason King
ac3848201d
SQLite adapters now support DDL transactions [ #2080 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-14 12:58:42 +00:00
Chris Kampmeier
3c64c9a575
Fix spelling of an internal method [ #1734 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 15:41:31 +00:00
Luca Guidi
47bdf3bf40
Ensure AutosaveAssociation runs remove callbacks [ #2146 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 15:24:37 +00:00
Elijah Miller
91b98cf0a5
Returning nil from named scope lambda is equivalent to an empty hash [ #1773 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 15:06:19 +00:00
Murray Steele
db26ace030
Ensure NoMethodError isn't raised when some of the nested eager loaded associations are empty [ #1696 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 13:49:16 +00:00
Will Bryant
92dadf6d79
Fixed autosave checks on objects with hm:t in :include [ #2213 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-12 13:26:21 +00:00
Pratik Naik
106976df09
Ensure ActiveRecord::Base.find_in_batches fires doesnt fire an extra query unless needed
2009-03-11 15:24:30 +00:00
Pratik Naik
f23adf0ed4
Add tests for AssociationCollection#find_each and AssociationCollection#find_in_batches
2009-03-11 15:07:24 +00:00
Pratik Naik
0b6f514947
Add NamedScope#find_each tests [ #2201 state:resolved]
2009-03-11 15:07:24 +00:00
Pratik Naik
04333482bd
Rename ActiveRecord::Base.each to ActiveRecord::Base.find_each
2009-03-11 15:07:23 +00:00
Jeremy Kemper
19ad375e7a
Don't duplicate :order from scope and options, it makes mysql do extra work
2009-03-10 23:11:05 -07:00
Manfred Stienstra
c3aa2bcdcf
Ensure nested with_scope merges conditions inside out [ #2193 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 11:49:58 +00:00
Bruce Krysiak
8272630ce8
Ensure ActiveRecord#to_xml respects :skip_types for included associations [ #1632 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 11:17:16 +00:00
Curtis Hawthorne
0d922885fb
Ensure Model#destroy respects optimistic locking [ #1966 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 14:56:09 +00:00
Jim Remsik and Tim Pope
1e6c50e21b
Ensure has_many :through works with changed primary keys [ #736 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 13:43:28 +00:00
Rob Anderton
faf4ba6b79
Allow find(:last) :order be a symbol [ #2024 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-09 12:52:14 +00:00
Jan De Poorter
277c799d58
Fix find_by_last when order is given [ #2127 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-03-09 13:02:31 +01:00
Jeremy Kemper
1c36172c13
Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
...
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Jeffrey Hardy
96eaeee446
Add ActiveRecord::Base#invalid? as the opposite of #valid? [ #2159 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-08 15:20:23 +00:00