Akira Matsuda
2d3e488bb3
ignore .gitignore'd files in rake test:uncomitted
2012-06-12 03:29:48 +09:00
Rafael Mendonça França
2eb4ebe308
Merge pull request #6699 from takkanm/fix-character-class-duplicated-range-warning
...
fix warning in Ruby2.0.0
2012-06-11 11:56:20 -03:00
takkanm
fa1ea34c5c
fix warning in Ruby2.0.0
...
```
rails/activesupport/lib/active_support/multibyte/chars.rb:136: warning:
character class has duplicated range: /\b('?[\S])/
```
2012-06-11 13:25:46 +09:00
Rafael Mendonça França
b5d82e20a8
Merge pull request #6698 from yahonda/address_ora_911_master
...
Address ORA-00911 errors because of the heading underscore.
2012-06-10 19:49:02 -07:00
Yasuo Honda
a0363e2ca6
Address ORA-00911 errors because of the heading underscore.
2012-06-11 11:41:07 +09:00
Rafael Mendonça França
f48e7676e9
Merge pull request #6521 from Empact/throw-result
...
Fix that #exists? can blow up with ThrowResult exception
2012-06-10 18:03:41 -07: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
José Valim
42259f69ae
Merge pull request #6694 from arunagw/build_fix_master
...
Build fix broken here 03f2249153ae4d2078646e6796d8b9e5ef747fba
2012-06-10 03:46:49 -07:00
Arun Agrawal
05558a4978
Build fix broken here 03f2249153ae4d2078646e6796d8b9e5ef747fba
2012-06-10 16:14:19 +05:30
José Valim
613357c1aa
Merge pull request #6692 from schneems/schneems/something-went-wrong
...
Add Prompt to 404 & 500 Pages to Check Logs in Production
2012-06-10 02:40:44 -07:00
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
Xavier Noria
d3a99c32d1
removes the obsolete require_association method from dependencies
...
This is an obsolete method from the very early days,
apparently it was used circa 2004 because STI support
was not smart enough. This method is not public
interface, and we are heading a major version, so
removal seems right.
2012-06-10 00:38:40 +02: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
4c82d3f0a4
add prompt to 404 & 500 pages to check logs
...
When new programmers push their code to a production server and receive an error they often don't know to check the logs, this simple reminder will help. Most professional applications have custom error pages so this change shouldn't affect them. The wording of the message should not confuse non-developer visitors.
2012-06-09 14:30:45 -05:00
schneems
d741a4c6f8
test errors for pending migrations
...
App should raise error on page_load
2012-06-09 13:31:11 -05: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
Piotr Sarnacki
066e6c66ce
Fix tests, active_authorizer shouldn't include blank values
...
Fix for a test failing after: 00ff0a6776
2012-06-09 03:15:39 +02:00
Piotr Sarnacki
41d63710f2
Merge pull request #6668 from pomnikita/master
...
Compact array of values added to PermissionSet instance
2012-06-08 11:35:13 -07:00
Rafael Mendonça França
d1136e6ad0
Merge pull request #6681 from arunagw/plugin_gen_fix
...
Plugin gen fix
2012-06-08 10:25:29 -07:00
Piotr Sarnacki
523820f81b
Don't add sqlite3 to gemspec with -O on rails plugin new
...
(closes #6672 )
2012-06-08 19:09:18 +02:00
Arun Agrawal
5fa87281ec
We should not include engine.rake file into rake
...
if we are passing -T which is skip_test_unit
See issue #6673 for more details.
I saw that we are not creating dummy app even if
we do skip_test_unit.
Fixes #6673
2012-06-08 22:39:14 +05:30
Arun Agrawal
cbfcabc9e9
Removed protected as we already doing it above.
2012-06-08 22:39:10 +05:30
Rafael Mendonça França
7495b262cf
Merge pull request #6667 from yahonda/skip_polymorphic_index_with_oracle
...
Skip two tests with polymorphic if current adapter is Oracle Adapter.
2012-06-07 14:51:52 -07:00
Rafael Mendonça França
6dfcc1b21d
Merge pull request #6597 from frodsan/am_include_root_to_false
...
change AMS::JSON.include_root_in_json default value to false
2012-06-07 14:31:51 -07: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
Nikita Pomyashchiy
00ff0a6776
Compact array of values added to PermissionSet instance
2012-06-08 01:00:34 +04: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
Carlos Antonio da Silva
b4fb80cbda
Merge pull request #6645 from amatsuda/reduce_string_instance
...
Reduce number of String instance
2012-06-06 08:49:38 -07:00
Akira Matsuda
ef9bbb87e8
reduce number of Strings
2012-06-06 23:33:31 +09:00
Rafael Mendonça França
96123978ff
Merge pull request #6647 from amatsuda/192_minitest_method_name
...
MiniTest::Spec shipped with Ruby >= 1.9.3 always responds_to __name__
2012-06-06 06:24:21 -07:00
Akira Matsuda
7fe6002793
MiniTest::Spec shipped with Ruby >= 1.9.3 always responds_to __name__
2012-06-06 22:00:43 +09:00
Akira Matsuda
2635a29fec
no need to to_s here. Both String and Symbol can be interpolated into String
2012-06-06 19:33:38 +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
Andrew White
9fb70033d3
Merge pull request #6644 from amatsuda/fix_meaningless_test_case
...
fix meaningless test case
2012-06-06 03:02:10 -07:00
Akira Matsuda
24889666c7
fix meaningless test case
...
Module#instance_methods returns an Array of Symbols in Ruby >= 1.9
So this was not actually testing anything
2012-06-06 18:56:49 +09:00
Andrew White
45427e28a9
Make method name consistent with existing methods
2012-06-06 10:27:55 +01:00
José Valim
7682f7004d
Merge pull request #6643 from fredwu/fix_require_dependency
...
Fixed the application_controller require_dependency path generated by the app generator
2012-06-06 02:16:33 -07:00