Commit Graph

4506 Commits

Author SHA1 Message Date
Aaron Patterson
45edeed1ee Arel::Sql::Engine.new does not do anything anymore 2010-09-30 16:28:12 -07:00
Aaron Patterson
0238228e5d type_name should check for blank because people may have messed up databases 2010-09-30 16:03:05 -07:00
Aaron Patterson
15419a5dc6 build_where should be private 2010-09-30 14:37:09 -07:00
Aaron Patterson
fb4ee9c7e5 type_name is never a blank string, so use faster .nil? call 2010-09-30 14:37:04 -07:00
Marcelo Giorgi
ef6df93a8d AssociationCollection#include? working properly for objects added with build method [#3472 state:resolved] 2010-09-30 12:13:52 -07:00
Aaron Patterson
505b532605 speeding up object instantiation by eliminating instance_eval 2010-09-30 12:13:12 -07:00
Aaron Patterson
a8a62f87f6 [#5441 state:resolved] refactoring code to determine aggregate column 2010-09-30 10:17:38 -07:00
Aaron Patterson
cc18034c8c group clause must be more specific 2010-09-30 10:17:34 -07:00
oleg dashevskii
ab9622ee62 Tests proving #5441 2010-09-30 10:17:29 -07:00
yalab
91deff08c9 Fix 'rake db:create' is ignore encoding when using postgres [#5717 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-30 13:53:06 -03:00
Piotr Sarnacki
f851352318 Added config.app_generators to allow configuring application's generators from railties.
With config.generators becomes a way to configure generators
for current instance only. For example:

module Blog
  class Engine < Rails::Engine
    config.generators do |g|
      g.orm :active_record
    end

    config.app_generators do |g|
      g.test_framework :rspec
    end
  end
end

such definition sets :active_record as orm for engine and :rspec
as test_framework for application. The values set with app_generators
can be overwritten in application using config.generators as you would
normally do:

module MyApp
  class Application < Rails::Application
    config.generators do |g|
      g.test_framework :test_unit
    end
  end
end
2010-09-30 09:47:06 +02:00
Neeraj Singh
396f3a28f1 double negative is not good 2010-09-30 08:11:36 +08:00
Neeraj Singh
299e9f6927 no need of nil check 2010-09-29 16:43:00 -07:00
Emilio Tagua
61cf11247b Use detect instead select to avoid "sh: [mysqldump]: command not found".
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-29 20:29:51 +02:00
Aaron Patterson
5793d5e002 eliminating method_missing on TableDefinition 2010-09-29 11:18:43 -07:00
Aaron Patterson
b9215273a9 DRY up postgresql quote logic 2010-09-29 10:36:33 -07:00
Aaron Patterson
4350a5c73f fixing where clause indentation 2010-09-29 10:36:33 -07:00
Aaron Patterson
5e77872ac9 use consistent method calls for column inspection 2010-09-29 10:36:33 -07:00
Aaron Patterson
df9abfab6f require pg when this adapter is loaded 2010-09-29 10:36:33 -07:00
Aaron Patterson
b5b7f2e442 only reopen ConnectionAdapters once 2010-09-29 10:36:33 -07:00
Aaron Patterson
b2979117e0 use inheritence to deal with custom methods 2010-09-29 10:36:32 -07:00
Aaron Patterson
2cc4b7f297 fisting test organization 2010-09-29 10:36:32 -07:00
Aaron Patterson
995ad3b378 just use if rather than nil? 2010-09-29 10:36:32 -07:00
Aaron Patterson
b3c7766df7 just require sqlite3 when the database adapter is required 2010-09-29 10:36:32 -07:00
Aaron Patterson
dec3a759d1 removing more useless code! yay! 2010-09-28 17:32:38 -07:00
Aaron Patterson
8d9f7b5b99 SqlLiteral is a string, so we can dry up these conditionals 2010-09-28 17:31:31 -07:00
Aaron Patterson
b50b1ef9e8 shorten up or sql literal creation statements 2010-09-28 17:12:19 -07:00
Aaron Patterson
39d98e5c09 we only care about arrays and strings 2010-09-28 17:05:32 -07:00
Aaron Patterson
957e6fbe2a dry up calls to arel.join() 2010-09-28 17:03:36 -07:00
Aaron Patterson
ef2392f60b removing unused lasgns 2010-09-28 16:59:38 -07:00
Aaron Patterson
e6ca7e7197 refactoring to remove crazy logic 2010-09-28 16:14:39 -07:00
Aaron Patterson
c2cad2d97e where_values_hash always returns a hash 2010-09-28 15:56:08 -07:00
Neeraj Singh
3f16103daf performance improvement based on discussion at fbd1d306b9
Credit goes to all the participants in the discussion
2010-09-28 15:52:26 -07:00
Aaron Patterson
9b89a436e5 Revert "porting 515917f5d8 to master"
This reverts commit bee447a5b9.
2010-09-28 15:51:07 -07:00
Aaron Patterson
16f5d29755 Revert "porting 0665182950 to master. Thanks Marcelo Giorgi"
This reverts commit 9eca11a4a5.
2010-09-28 15:51:00 -07:00
Aaron Patterson
10041e2d45 removing a conditional that is not used 2010-09-28 15:39:24 -07:00
Aaron Patterson
d0fb0d770f fisting the postgresql tests 2010-09-28 15:32:12 -07:00
Marcelo Giorgi
cdfd013dd7 Set attributes properly for model built from association with conditions [#5562 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-28 15:22:50 -03:00
Aaron Patterson
2fc5c6333b each works well too 2010-09-28 10:43:18 -07:00
Aaron Patterson
e001ea0940 no need for splat and flatten 2010-09-28 10:40:43 -07:00
Aaron Patterson
9b561ab029 avoid calling to_sql when we can 2010-09-28 10:37:35 -07:00
Aaron Patterson
bf2223d0e0 removing an inject + merge in favor of Hash#[] 2010-09-28 10:30:42 -07:00
Aaron Patterson
75e52df0e8 fixing indentation warning 2010-09-28 10:26:32 -07:00
Étienne Barrié
8b8730e139 Test add_index and remove_index with a symbol name #4891 2010-09-28 10:06:57 -07:00
Aaron Patterson
9eca11a4a5 porting 0665182950 to master. Thanks Marcelo Giorgi 2010-09-28 10:04:33 -07:00
Aaron Patterson
bee447a5b9 porting 515917f5d8 to master 2010-09-28 10:02:03 -07:00
Aaron Patterson
b7934afe32 use new skool Ruby instead of Ruby Classic™ 2010-09-27 18:55:28 -07:00
Aaron Patterson
7752b2fa62 be kind to the garbage collector: only instantiate objects when absolutely necessary 2010-09-27 18:07:35 -07:00
Aaron Patterson
526ade1ff6 adding test cases for the dynamic finder matcher match method 2010-09-27 17:59:28 -07:00
Aaron Patterson
65d74312c8 constructor should not do so much work; avoid allocating object if possible 2010-09-27 17:38:49 -07:00