Vijay Dev
6285675db1
fixes a few mistakes in api docs [ci skip]
2012-06-22 22:14:29 +05:30
Andrés Mejía
3b4d286cd9
Typo in documentation.
2012-06-19 13:41:36 -05:00
Florent Guilleux
7ed38907fd
Add documentation for ActiveRecord::QueryMethods#reverse_order [ci skip]
2012-06-16 17:41:43 -05:00
Ulises Cabanillas
a28eda16d3
Add documentation for ActiveRecord::QueryMethods#offset [ci skip]
2012-06-16 17:32:33 -05:00
Florent Guilleux
d62645cfbf
Add documentation for ActiveRecord::QueryMethods#limit [ci skip]
2012-06-16 17:16:10 -05:00
Vijay Dev
c1474ff2e7
Merge branch 'master' of github.com:lifo/docrails
2012-06-14 22:52:38 +05:30
Xavier Noria
f278b06789
removes item in the Active Record CHANGELOG
...
That change to update_attribute was considered
to be too subtle and was reverted in 30ea923
just before Rails 3 shipped. Later we introduced
update_column (Rails 3.1).
2012-06-14 11:50:10 +02:00
Arun Agrawal
ddf58fa9aa
Need a assert here in tests
2012-06-12 14:39:40 -04:00
Rafael Mendonça França
a268d2dc97
Merge pull request #6676 from aurelian/master
...
Don't assign the attributes if the list is empty
2012-06-12 10:45:19 -07:00
kennyj
34492af710
Create hstore extension when building PostgreSQL databases.
2012-06-12 19:34:24 +09:00
Rafael Mendonça França
e6ea3fec30
Remove warnings and unused code
2012-06-11 22:07:37 -03:00
Rafael Mendonça França
65d584c35b
No need to cache table metadata in advance now that #6683 was merged.
2012-06-11 18:13:14 -03:00
Rafael Mendonça França
174f36a077
Merge pull request #6492 from pmahoney/fair-connection-pool2
...
Fair connection pool2
Conflicts:
activerecord/test/cases/associations/eager_test.rb
2012-06-11 17:26:33 -03:00
Rafael Mendonça França
2d1ca38774
Merge pull request #6709 from amatsuda/sqlite3_version_is_always_gt_125
...
current AR::ConnectionAdapters::SQLite3Adapter supports only SQLite3 ~> 1.3.6
2012-06-11 13:04:43 -07:00
Akira Matsuda
998ef50ef1
current AR::ConnectionAdapters::SQLite3Adapter supports only SQLite3 ~> 1.3.6
2012-06-12 04:54:48 +09:00
Akira Matsuda
73d1046646
TimeZone format is always /[+-]\d{2}:\d{2}/ in Ruby 1.9
2012-06-12 02:41:58 +09:00
chrismcc
a6e4c0f3e4
Fixed typo.
2012-06-11 09:54:54 -03:00
Yasuo Honda
a0363e2ca6
Address ORA-00911 errors because of the heading underscore.
2012-06-11 11:41:07 +09:00
Ben Woosley
340a93f502
Fix that #exists? raises ThrowResult when called with an empty limited
...
reflection.
ActiveRecord::FinderMethods#construct_limited_ids_condition will raise
ThrowResult if the limited reflection comes back empty. The other callers
of #construct_limited_ids_condition handle this exception (more specifically,
the callers of construct_relation_for*), but #exists? didn't until now.
2012-06-10 17:51:17 -07:00
Rafael Mendonça França
d17fa452ec
Remove bundle exec from the exception message
2012-06-10 17:23:57 -03:00
Rafael Mendonça França
6cc5e9aa81
Add test to column alias in exists?
SQL.
...
This behavior was added in be4ecdcc87984e9421ff5d5c90d33f475e0fbc01.
Closes #1139 .
Fixes #2553 , #1141 , #1623 and #2062 .
2012-06-10 16:57:03 -03:00
iaddict
be4ecdcc87
Minimal change to query generation of exists? that makes SQLServer and others happy that do not work without a column alias.
...
Conflicts:
activerecord/lib/active_record/relation/finder_methods.rb
2012-06-10 16:26:40 -03:00
Rafael Mendonça França
4da1af7fc1
Merge pull request #6695 from kennyj/fix_6635
...
Fix #6635 . We should call Scoping methods, before calling Array methods.
2012-06-10 08:45:28 -07:00
Andrew White
c2e61aa615
Ensure that mass assignment options are preserved
...
There are two possible scenarios where the @mass_assignment_options
instance variable can become corrupted:
1. If the assign_attributes doesn't complete correctly, then
subsequent calls to a nested attribute assignment method will use
whatever options were passed to the previous assign_attributes call.
2. With nested assign_attributes calls, the inner call will overwrite
the current options. This will only affect nested attributes as the
attribute hash is sanitized before any methods are called.
To fix this we save the current options in a local variable and then
restore these options in an ensure block.
2012-06-10 16:23:34 +01:00
kennyj
cd1be1acc6
Fix #6635 . We should call Scoping methods, before calling Array methods.
2012-06-10 23:55:42 +09:00
Arun Agrawal
05558a4978
Build fix broken here 03f2249153ae4d2078646e6796d8b9e5ef747fba
2012-06-10 16:14:19 +05:30
José Valim
03f2249153
Use . instead of :: for class methods, add CHANGELOG entries
2012-06-10 11:38:37 +02:00
José Valim
4845c0685a
Merge pull request #6665 from schneems/schneems/raise-migration-error
...
Notify A User they Have Pending Migrations
2012-06-10 02:33:14 -07:00
Rafael Mendonça França
fdcc252e81
Merge pull request #6683 from stevecj/fix-fragile-assert-queries
...
Fix fragile #assert_queries implementation and usages.
2012-06-09 19:49:36 -07:00
Steve Jorgensen
88d6ae304e
Fix fragile #assert_queries implementation and usages.
...
Several tests that passed when run in the order they are loaded
by rake test were failing when run in different sequences due to
problems with the implementation of assert_queries and
assert_no_queries as well as incorrect assumptions made about
how many queries might be executed by a database adapter in
various cases.
2012-06-09 14:16:13 -07:00
schneems
96f19f6cf6
raise error for pending migration
...
can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
2012-06-09 13:30:23 -05:00
Santiago Pastorino
6bd729e86f
Remove conditional committed by accident
2012-06-09 10:41:21 -03:00
Santiago Pastorino
f9cfe9a4b2
Use each_with_object instead of each here
2012-06-09 09:40:55 -03:00
José Valim
aa2bfd69f8
Merge pull request #6687 from tiegz/3-2-optimizations
...
ActiveRecord#attributes optimization: minimize objects created
2012-06-09 12:25:19 +02:00
Aurelian Oancea
79c8c4fed4
Don't assign the attributes if the list is empty.
2012-06-08 12:45:01 +02:00
Yasuo Honda
a74f840750
Skip two tests with polymorphic if current adapter is Oracle Adapter.
...
because Oracle Adapter does not support foreign keys if :polymorphic => true is used.
2012-06-08 06:21:26 +09:00
Carlos Antonio da Silva
e638c613d0
Merge pull request #6629 from marcandre/destroy
...
Add ActiveRecord::Base#destroy!
2012-06-06 10:39:03 -07:00
Marc-Andre Lafortune
4faaa81161
+ ActiveRecord::Base#destroy!
2012-06-06 13:27:51 -04:00
Akira Matsuda
ef9bbb87e8
reduce number of Strings
2012-06-06 23:33:31 +09:00
Akira Matsuda
099639670a
Symbol responds_to :upcase & :downcase in Ruby >= 1.9
2012-06-06 19:33:38 +09:00
Akira Matsuda
edee2c7b3b
stop to_s
ing method names
...
Module#methods are Symbols in Ruby >= 1.9
2012-06-06 19:33:38 +09:00
Carlos Antonio da Silva
8359a2f981
Merge pull request #6616 from dpassage/fix_resolver_test_sqlite3
...
Resolver tests fail if mysql adapter not installed
2012-06-05 05:35:42 -07:00
kennyj
635032fe3b
Fix #6591 . If a field with timezone isn't changed, we don't call will_change!.
2012-06-04 18:35:08 +09:00
Evan Arnold
cfc7f602bf
Add failing test for 3.2.5 datetime attribute regression
2012-06-04 18:35:08 +09:00
David Paschich
a36bda8770
The resolver tests fail if the mysql gem is not installed; this breaks
...
being able to run the sqlite3 tests without that gem. This fix ensures
the tests will only run if the mysql gem is installed.
A better solution might be to move these tests into the per-adapter tests,
and test each adapter's resolver.
2012-06-03 17:24:17 -07:00
schneems
e5b39862cb
add convenience methods for checking migrations
...
if a rails project needs to be migrated ActiveRecord::Migrator.needs_migration? will be true or false if the current version matches the last version.
2012-06-03 15:07:11 -05:00
Akira Matsuda
37a4dd5ccf
a test case that ensures AR::Relation#merge can merge associations
2012-06-03 13:28:01 +09:00
Xavier Noria
afcc7cc301
minor comment revision
2012-06-01 16:57:58 +02:00
Rafael Mendonça França
3449b757da
Sync CHANGLOG with the 3-2-stable branch
2012-06-01 11:41:30 -03:00
Akira Matsuda
c1ea574b27
improve readability of AR explain result
2012-06-01 17:05:52 +09:00