Sebastian Martinez
245542ea29
Added new #update_column method.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-03-27 21:47:38 -03:00
Sebastian Martinez
0e1fed537a
Revert "Removed #update_attribute method. New #update_column method."
...
This reverts commit 45c233ef81 .
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-03-27 18:55:30 -03:00
Aaron Patterson
a9d27c04ab
cleaning up typecast test a little
2011-03-26 17:16:33 -07:00
Aaron Patterson
5013fe3a1d
refactoring tz to a variable rather than repeating it
2011-03-26 17:04:54 -07:00
Aaron Patterson
dea3d2dd20
adding a test for attributes after type cast. thanks nragaz. ❤️
2011-03-26 11:50:31 -07:00
Sebastian Martinez
45c233ef81
Removed #update_attribute method. New #update_column method.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-03-26 12:09:04 -03:00
Aaron Patterson
7333f50abc
fixing whitespace errors. 💣
2011-03-25 12:10:11 -07:00
Josh Susser
5214e73850
add #first! and #last! to models & relations
2011-03-24 09:55:51 -07:00
Adam Meehan
c5908a8649
Fix before_type_cast for timezone aware attributes by caching converted value on write. Also remove read method reload arg on timezone attributes.
2011-03-23 15:38:51 -07:00
Murray Steele
8ee81d21fb
Failing test case to show that habtm join table contents are removed when a model is destroyed but the destruction is blocked by a before_destroy.
2011-03-23 14:45:21 -07:00
Santiago Pastorino
baa237c974
Allow to read and write AR attributes with non valid identifiers
2011-03-22 20:02:32 -03:00
Aaron Patterson
ed97c39517
adding missing require
2011-03-22 10:10:33 -07:00
Aaron Patterson
2ef6270f8f
Merge branch 'master' into fuuu
...
* master:
Do not show optional (.:format) block for wildcard route [#6605 state:resolved]
pushing id insertion and prefetch primary keys down to Relation#insert
use prepared statements to fetch the last insert id
escaping binary data encoding when inserting to sqlite3. Thanks Naruse! [#6559 state:resolved]
schemas set by set_table_name are respected by the mysql adapter. [#5322 state:resolved]
Reapply extensions when using except and only
SJIS is an alias to Windows-31J in ruby trunk. Use SHIFT_JIS for this test
Improved resolver docs a bit
[action_view] docs for FileSystemResolver
[action_view] added custom patterns to template resolver
2011-03-22 09:34:33 -07:00
Aaron Patterson
88636f7195
escaping binary data encoding when inserting to sqlite3. Thanks Naruse! [ #6559 state:resolved]
2011-03-21 14:49:07 -07:00
Aaron Patterson
ea8fcfb729
schemas set by set_table_name are respected by the mysql adapter. [ #5322 state:resolved]
2011-03-21 11:20:45 -07:00
Iain Hecker
96b9fc4400
Reapply extensions when using except and only
2011-03-21 10:29:45 -07:00
Jon Leighton
5b84aebd14
Add order clauses to fix some tests which were failing under 1.8 on oracle and postgres
2011-03-18 23:14:45 +00:00
Jon Leighton
8aaf3c1e55
Merge branch 'master' into nested_has_many_through
2011-03-16 18:54:51 +00:00
Jon Leighton
9abc94c445
oracle, y u defy me
2011-03-16 18:54:34 +00:00
Andrew White
47871b025e
Remove invalid test
...
The test fails on PostgreSQL when trying to load the records as
the comments_count field is not included in the GROUP BY clause.
2011-03-13 08:43:19 +00:00
Chris Oliver
015192560b
Fixed a bug when empty? was called on a grouped Relation that wasn't loaded
...
[#5829 state:resolved]
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk >
2011-03-12 22:31:21 +00:00
Jon Leighton
37d93ea160
Fix tests under postgres - we should always put conditions in the WHERE part not in ON constraints because postgres requires that the table has been joined before the condition references it.
2011-03-12 09:32:20 +00:00
Jon Leighton
39a6f4f25d
Simplify implementation of ThroughReflection#chain
2011-03-11 00:51:57 +00:00
Jon Leighton
582edaa1ff
Merge branch 'master' into nested_has_many_through
2011-03-10 19:35:20 +00:00
Jon Leighton
2d3d9e3531
Rename Reflection#through_reflection_chain and #through_options to Reflection#chain and Reflection#options as they now no longer relate solely to through associations.
2011-03-10 19:28:26 +00:00
Xavier Noria
f41dd99be7
revises links to the API websites of individual components (no longer maintained), and rewrites the section about after and around filters in the controller guide
2011-03-09 07:43:18 +01:00
Jon Leighton
532f915037
Referencing a table via the ON condition in a join should force that table to be eager-loaded via a JOIN rather than via subsequent queries.
2011-03-07 08:51:17 -08:00
Jon Leighton
cee3f9b36d
Referencing a table via the ON condition in a join should force that table to be eager-loaded via a JOIN rather than via subsequent queries.
2011-03-07 00:04:20 +00:00
Jon Leighton
28ed10d3f2
Merge branch 'master' into nested_has_many_through
...
Conflicts:
activerecord/CHANGELOG
2011-03-05 22:58:48 +00:00
Jon Leighton
7fddb94262
Push source_type and polymorphic conditions out of ThroughAssociation and JoinDependency::JoinAssociation and into the reflection instead.
2011-03-05 22:07:30 +00:00
Jon Leighton
ddf83d14f1
Add a test for STI on the through where the through is nested, and change the code which support this
2011-03-05 20:10:24 +00:00
R.T. Lechow
a1b4d8e7b2
Active Record typos.
2011-03-05 11:56:34 +01:00
Xavier Noria
3b10b8a201
implements ActiveRecord::Base.connection_config to be able to check the configuration of the current connection at runtime
2011-03-05 01:35:02 +01:00
Jon Leighton
8987cda2bb
When preloading has_and_belongs_to_many associations, we should only instantiate one AR object per actual record in the database. (Even when IM is off.)
2011-03-04 15:16:07 -08:00
Jon Leighton
73c0b390b3
When preloading has_and_belongs_to_many associations, we should only instantiate one AR object per actual record in the database. (Even when IM is off.)
2011-03-04 22:33:16 +00:00
Jon Leighton
735844db71
Merge branch 'master' into nested_has_many_through
...
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/association_preload.rb
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/class_methods/join_dependency.rb
activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
activerecord/lib/active_record/associations/has_many_association.rb
activerecord/lib/active_record/associations/has_many_through_association.rb
activerecord/lib/active_record/associations/has_one_association.rb
activerecord/lib/active_record/associations/has_one_through_association.rb
activerecord/lib/active_record/associations/through_association_scope.rb
activerecord/lib/active_record/reflection.rb
activerecord/test/cases/associations/has_many_through_associations_test.rb
activerecord/test/cases/associations/has_one_through_associations_test.rb
activerecord/test/cases/reflection_test.rb
activerecord/test/cases/relations_test.rb
activerecord/test/fixtures/memberships.yml
activerecord/test/models/categorization.rb
activerecord/test/models/category.rb
activerecord/test/models/member.rb
activerecord/test/models/reference.rb
activerecord/test/models/tagging.rb
2011-03-04 09:30:27 +00:00
Jon Leighton
d90b4e2615
Rewrote AssociationPreload.
2011-02-28 22:12:34 +00:00
Aaron Patterson
a8dae084c9
skip this on oracle
2011-02-28 09:15:19 -08:00
Aaron Patterson
f3e9cbc695
use an attribute rather than a SQL literal
2011-02-26 16:05:15 -08:00
Aaron Patterson
54a2bf6601
removing limits and offsets from COUNT queries unless both are specified. [ #6268 state:resolved]
2011-02-25 15:38:59 -08:00
Eric Allam
13547c16d9
fixes: ActiveRecord::Base.scopes includes all scopes defined in all subclasses
2011-02-24 11:17:06 -08:00
Aaron Patterson
5f1fc0c8ac
observers leak across tests, so rather than modify the object, we should just count the number of times the observer was called
2011-02-23 16:04:01 -08:00
Kamal Fariz Mahyuddin
6ba8caf3ee
Fix observer callbacks firing multiple times on descendant instances
2011-02-22 16:25:19 -08:00
Aaron Patterson
2cce44fa7c
expectations change when using IM. Change oracle tests to reflect that
2011-02-22 11:27:12 -08:00
Aaron Patterson
b3fcabb3a5
adding a test case for custom locking
2011-02-21 16:12:02 -08:00
Jon Leighton
52f8e4b9da
Use proper objects to do the work to build the associations (adding methods, callbacks etc) rather than calling a whole bunch of methods with rather long names.
2011-02-21 10:16:15 -08:00
Xavier Noria
f826e05835
Merge branch 'master' of git://github.com/lifo/docrails
2011-02-21 11:42:26 +01:00
Nicholas Rowe
2a75c190d4
Tpyo: fixing several cases of the the
2011-02-19 23:47:12 -05:00
Aaron Patterson
8657826f41
oops, no need for puts!
2011-02-18 15:53:54 -08:00
Aaron Patterson
30679bc705
AR::AttributeMethods does not need to be included in an AR::Base class.
2011-02-18 15:51:39 -08:00