Pratik Naik
c5c2e4fefd
Add timestamps to Topic
2010-11-02 01:24:31 +00:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
Neeraj Singh
a3ce6fcc56
adding column named 'group' to ensure that nothing breaks given that 'group' is sql reserved word
...
[#4945 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 17:46:37 +02:00
Aaron Patterson
dcf1441c0f
removing dead code from activerecord tests. [ #4187 state:resolved]
...
Signed-off-by: wycats <wycats@gmail.com>
2010-03-15 18:36:08 -07:00
Eloy Duran
7f775ef1a9
Renamed AssociationReflection #collection_association? to #collection?.
2010-01-08 21:47:17 +01:00
Eloy Duran
b6264c43f4
Moved the validation logic to the association reflection and refactored autosave_association.rb a bit.
2010-01-07 13:19:48 +01:00
Eloy Duran
f82adc7c5a
Add AssociationReflection#collection_association? which returns true if it's for a has_many or has_and_belongs_to_many association.
2010-01-07 13:19:48 +01:00
David Heinemeier Hansson
1459c8cc1d
Changed ActiveRecord::Base.store_full_sti_class to be true by default reflecting the previously announced Rails 3 default [DHH]
2010-01-03 19:30:28 -08:00
Matt Jones
d625312fe1
delete correct records for a has_many with :primary_key and :dependent => :delete_all
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-11-10 18:41:37 +13: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
Luciano G Panaro
4168f87623
Make has_one with :conditions hash scope build or creation of the associated object with those conditions
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#3088 state:committed]
2009-09-28 14:50:33 +13:00
Graeme Porteous
c01be9de32
Fix has_one with foreign_key and primary_key association bug which caused the associated object being lost when saving the owner. [ #1756 state:resolved]
...
Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 16:03:32 +02:00
Eloy Duran
6cc0b9638f
Explicitely setting `autosave => false' should override new_record autosaving. [ #2214 state:resolved]
...
Original author is Jacob.
2009-09-12 15:53:15 +02:00
railsbob
e06a0b03c8
has_many :through create should not raise validation errors
...
[#2934 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 18:44:45 -07:00
Szymon Nowak
1c11437a32
Add primary_key option to belongs_to association
...
[#765 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-07-15 18:13:32 -07:00
Pratik Naik
45e6f19925
Revert "Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [ #2118 state:resolved]""
...
This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832.
The feature doesn't work on Postgres, so don't test it on Postgres.
Also, Postgres compatibility is irrelevant to the ticket/patch in question.
2009-07-01 00:02:00 +01:00
Justin French
7d548f795d
Changed ActiveRecord::Base.human_name to underscore the class name before it humanizes it
...
This gives you 'Post comment' rather than 'Postcomment' by default.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2120 state:committed]
2009-06-30 15:24:04 +12:00
Yehuda Katz + Carl Lerche
80f1f863cd
Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [ #2118 state:resolved]"
...
This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a.
The tests do not pass for postgresql.
2009-06-22 12:04:02 -07:00
Patrick Joyce
4851ca9e13
Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [ #2118 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-06-21 22:07:23 +01: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
Dimitri Krassovski
984bc7a614
Ensure replacing has_one associations respects the supplied :dependent option. [ #1305 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-06 19:11:13 +00:00
Eloy Duran
ec8f045844
Add support for nested object forms to ActiveRecord and the helpers in ActionPack
...
Signed-Off-By: Michael Koziarski <michael@koziarski.com>
[#1202 state:committed]
2009-02-01 14:44:30 +13:00
Pratik Naik
25ca21ae21
Introduce ActiveRecord::Reflection::ThroughReflection to simplify hm:t reflection logic
2008-10-04 17:49:39 +01:00
miloops
a37c5ae961
Improve test coverage when using the group option in find, has_many or has_and_belongs_to_many.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-09-11 22:51:57 +02:00
Ryan Bates
8f4d3957a6
Don't raise exception when comparing ActiveRecord::Reflection. [ #842 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-16 20:21:36 +01:00
Brad Greenlee
afa0c7f728
Add support for :primary_key option to has_one as well as has_many so that a key other than the default primary key can be used for the association
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-07-06 20:25:10 +02:00
Jan De Poorter
7f140bbdda
Add :validate option to associations. [ #301 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-06-11 12:21:57 +01:00
Michael Koziarski
6277fd9113
Fix faulty tests introduced in 8d0b4fa39
2008-05-24 18:34:59 +12:00
Jeremy Kemper
dfa786631b
Introduce the :readonly option to all associations. Records from the association cannot be saved. Closes #11084 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-13 06:32:50 +00:00
Jeremy Kemper
39814fcce0
Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:20:51 +00:00
Jeremy Kemper
1e70928014
Fix paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:31:37 +00:00
Jeremy Kemper
42b39ae3f2
Move tests to cases
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:30:42 +00:00