Aaron Patterson
b102e60bf5
adding a test for create! with invalid associations
2011-05-24 11:26:44 -07:00
Aaron Patterson
d48563352f
do not bother with assert_nothing_raised, the test will fail and we get a better trace without it
2011-05-24 11:26:39 -07:00
Joey Butler
177666ebcf
Add failing test case for issue 796
2011-05-24 11:26:34 -07:00
Jon Leighton
872a9c1b50
Fix problem with loading polymorphic associations which have been defined in an abstract superclass. Fixes #552 .
2011-05-23 20:30:26 +01:00
Guillermo Iguaran
6e5419a0b1
Adding pluralize_table_names change to CHANGELOG
2011-05-21 22:16:34 -05:00
David Heinemeier Hansson
82857adc56
Bump versions for rc1
2011-05-21 20:56:52 -05:00
Xavier Noria
eb0257944e
Merge pull request #1180 from Karunakar/documentation_change
...
Documentation Error Fixed for ticket #839
2011-05-21 10:39:28 -07:00
Santiago Pastorino
da8469fa7d
Merge pull request #1187 from thedarkone/polymorphic-class-fix
...
Handle polymorphic_type NOT NULL columns
2011-05-21 09:43:42 -07:00
Andrew White
09daaaa1e0
Add support for passing mass assignment roles to dynamic finders. Closes #1170 .
2011-05-21 16:33:54 +01:00
thedarkone
1c614bcb0f
Handle polymorphic_type NOT NULL-able columns as well.
2011-05-21 15:18:09 +02:00
José Valim
26703f4905
Merge pull request #1165 from arunagw/rubyforge_remove
...
Not updating rubyforge for new versions.
2011-05-21 04:55:37 -07:00
Jon Leighton
d62a39a22b
Merge pull request #1162 from guilleiguaran/singularize_individual_table_name
...
Singularize individual table name
2011-05-21 01:30:00 -07:00
Ganesh Kumar
3d789ea4b9
ActionMailer deliver method Documentation corrected Ticket #761
2011-05-21 13:55:52 +05:30
Karunakar (Ruby)
b134e0f445
Documentation Error Fixed for ticket #839
2011-05-21 13:01:53 +05:30
Guillermo Iguaran
e0e8918003
AliasTracker.pluralize use pluralize_table_names of model
2011-05-20 22:54:55 -05:00
Xavier Noria
499825e19f
Merge pull request #1157 from smartinez87/extra_whitespaces
...
Remove extra white spaces.
2011-05-20 06:03:12 -07:00
Arun Agrawal
f72f591c8c
Not updating rubyforge for new versions. Result of "gem list -d rails" is not useful.
2011-05-20 17:43:40 +05:30
Guillermo Iguaran
23e94a67f8
Refactoring test_has_many_with_pluralize_table_names_false test
2011-05-20 01:53:13 -05:00
Guillermo Iguaran
6a3b3fba5a
Allow pluralize_table_names for individual model
2011-05-20 01:44:13 -05:00
Guillermo Iguaran
159213001a
for => each in model migration template
2011-05-20 00:22:17 -05:00
Guillermo Iguaran
e7d600dcdb
Syntax cleanup: for in => each
2011-05-19 22:55:37 -05:00
Sebastian Martinez
b91c9076a6
Remove extra white spaces.
2011-05-19 20:51:33 -03:00
Jon Leighton
0afd5850f5
Implement proxy_owner, proxy_target and proxy_reflection methods on CollectionProxy with deprecations. Fixes #1148 .
2011-05-19 23:28:44 +01:00
Michael Koziarski
2c08a74855
Merge pull request #1097 from kirillrdy/master
...
Improved "treat 0000-00-00 00:00:00 as nil Date"
2011-05-19 09:13:54 -07:00
Xavier Noria
b13d24e5b9
Merge branch 'master' of git://github.com/lifo/docrails
2011-05-18 22:50:44 +02:00
Akira Matsuda
0cd38a4af1
on.upcase!
2011-05-19 01:29:34 +09:00
Akira Matsuda
486a890505
why not use JOIN statement for joining tables? (vol. 2)
2011-05-18 18:51:03 +09:00
Akira Matsuda
df13f55d75
remove unused table from FROM clause
...
pg_namespace has not been used since this commit 29b0707f07
2011-05-18 18:50:33 +09:00
Akira Matsuda
a61556387a
why not use JOIN statement for joining tables?
2011-05-18 18:50:33 +09:00
Santiago Pastorino
9773f6e1aa
Add missing require
2011-05-17 19:50:17 -04:00
Sebastian Martinez
84e541ecb4
Better doc styling in ActiveRecord::Locking
2011-05-17 20:21:35 -03:00
Aaron Patterson
a898df66e4
bumping arel requirement
2011-05-17 18:05:27 -04:00
Andrew White
f3b0be812e
Don't pass a block as we are yielding
2011-05-17 22:33:36 +01:00
Andrew White
3773aa4fbb
Add block setting of attributes to singular associations
2011-05-17 22:16:24 +01:00
Andrew White
42f1ad6865
Pass the attribute and option hashes to build_association
...
The build_association method was added as an API for plugins
to hook into in 1398db0 . This commit restores this API and the
ability to override class.new to return a subclass based on
a virtual attribute in the attributes hash.
2011-05-17 20:43:30 +01:00
Arun Agrawal
ed119aa5d6
Fixed InnerJoinAssociationTest. Need to load essays fixture.
2011-05-17 20:29:28 +05:30
Kirill Radzikhovskyy
6f0ebe040a
Year 0 should fall to nil only if month and day are also 0
2011-05-17 16:31:09 +10:00
Guillermo Iguaran
2c89ed9ad6
Adding missing require
2011-05-16 22:22:27 -05:00
Jon Leighton
2033ff825b
Merge pull request #560 from guilleiguaran/fix_pluralize_table_names_false
...
Fixing has_many when ActiveRecord::Base.pluralize_table_names is false
2011-05-16 15:40:12 -07:00
Guillermo Iguaran
23ad13ee17
Mailer example has more sense calling to deliver method
2011-05-15 21:19:15 -07:00
Sebastian Martinez
2470392e89
Add doc to #attribute_names
2011-05-15 21:33:49 -03:00
Prem Sichanugrist
5ca67eca21
Add ActiveRecord::attribute_names to retrieve a list of attribute names. This method will also return an empty array on an abstract class or a model that the table doesn't exists.
2011-05-15 19:07:40 -04:00
Guillermo Iguaran
ecbde46e57
Fixing has_many association when ActiveRecord::Base.pluralize_table_names is false. fixes #557
2011-05-15 03:53:10 -05:00
Jon Leighton
7e6145b4a2
These extra array operations appear to be unnecessary. Reasoning:
...
* It is not necessary to subtract 'id' from the list of copied attributes because record and mem_record are equal, so therefore their id attributes are also equal (so there is no harm in copying it, and this reduces the complexity of the code)
* It is not necessary to intersect the attribute names, since record and mem_record are equal, so they have the same id and class, so they have the same columns in the database. If record has non-column attributes then it seems reasonable to also copy them onto mem_record (though I am not sure what situation this would ever happen in)
2011-05-14 19:49:22 +01:00
Jon Leighton
60b23ea1da
CollectionAssociation#merge_target_lists should write to the underlying attributes when copying, rather than using the assignment method
2011-05-14 19:49:22 +01:00
Jon Leighton
6660beef36
An attempt to make CollectionAssociation#merge_target_lists make more sense.
2011-05-14 19:49:22 +01:00
José Valim
e7e1d83ddf
Added some docs to controller runtime.
2011-05-14 03:59:14 -07:00
Tom Ward
6d96124284
Reset ActiveRecord::LogSubscriber runtime at the start of each request
...
Previously the runtime was reset implicitly when #cleanup_view_runtime was called at the end of most requests. However, this doesn't happen when the request redirects, or send_file is called. Consequently, the ActiveRecord runtime recorded in the logs included the time taken for both the current request and the previous redirect. Explicitly resetting at the start of each request ensures that this can't happen, no matter what occurs previously.
2011-05-14 10:39:01 +01:00
Xavier Noria
d491130236
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
actionpack/lib/action_view/helpers/date_helper.rb
railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
2011-05-14 11:21:27 +02:00
Jon Leighton
8a1de9b252
Instead of doing find(:all) which does scoped.find(:all) which does scoped.all, just do scoped.all.
2011-05-13 23:53:02 +01:00