Aaron Patterson
603406dc53
stop using deprecated arel API
2010-10-12 14:33:16 -07:00
Aaron Patterson
25a2909355
dry up column type testing
2010-10-12 13:13:19 -07:00
Aaron Patterson
4b2e16ed24
all columns respond to string_to_binary, so no need to check respond_to?
2010-10-12 13:10:52 -07:00
Aaron Patterson
5b5ae01f29
drying up true and false cases
2010-10-12 11:59:20 -07:00
Aaron Patterson
01893f43f6
reducing comparisons in when statements
2010-10-12 11:55:52 -07:00
Aaron Patterson
9852a72417
removing intermediate variables
2010-10-12 11:48:41 -07:00
Aaron Patterson
c882154cd1
reduce the number of times we test for the column variable
2010-10-12 11:45:59 -07:00
Aaron Patterson
31b132aa9b
refactoring date / time / datetime when statement
2010-10-12 11:41:23 -07:00
Aaron Patterson
ef11ce2af8
fixing case / when indentation
2010-10-12 11:38:40 -07:00
Aaron Patterson
cecccf1156
we should always cast the value based on the column
2010-10-11 13:35:58 -07:00
Aaron Patterson
bef5b826e3
removing freeze
2010-10-11 13:02:36 -07:00
Marcelo Giorgi
1c9022de21
Honor distinct option when used with count operation after group clause [ #5721 state:resolved]
2010-10-11 09:39:34 -07:00
Santiago Pastorino
e0b76d6151
reorder removed in favor of except(:order).order
2010-10-11 11:54:46 -02:00
José Valim
a8b1780410
Updated DOCS for engines and added a couple TODOs. Also, commented internal railties rake tasks description.
2010-10-11 10:29:31 +02:00
wycats
cc8e386d08
Always pull in version for frameworks (standardize autoload / require / none)
2010-10-10 16:12:04 -07:00
Piotr Sarnacki
8636f64def
Rename rake railties:copy_migrations to rake railties:install:migrations and fix it to work with new copying strategy
2010-10-09 21:32:34 +02:00
Piotr Sarnacki
022205be1d
Add callback on skipped migration while copying migrations
2010-10-09 21:32:34 +02:00
Piotr Sarnacki
4377f8eba2
Change the method for copying migrations, do not add scope.
...
The purpose of this change is to allow copying fail on the same names.
Migrations change database and they should be treated with caution,
if 2 migrations are named the same it's much better to skip migration
and allow user decide if it should be copied or not.
2010-10-09 21:32:34 +02:00
Aaron Patterson
740d7e5aa2
removing false comment
2010-10-07 16:40:15 -06:00
Xavier Noria
db520042b3
Merge branch 'master' of git://github.com/lifo/docrails
2010-10-06 23:16:13 +02:00
Hemant Kumar
2a04110f26
fix ruby 1.9 deadlock problem, fixes #5736 add connection pool tests
2010-10-06 14:45:56 -06:00
José Valim
d649bf158b
Provide a cleaner syntax for paths configuration that does not rely on method_missing.
2010-10-06 17:20:15 +02:00
Aaron Patterson
e7d860c6be
create fewer objects, call fewer methods in extract_pg_identifier_from_name
2010-10-04 15:25:20 -07:00
Aaron Patterson
d8135eb452
* + flatten is not required in >= Ruby 1.8.7
2010-10-04 15:19:27 -07:00
Aaron Patterson
69a2c6b041
converting inject([]) to map
2010-10-03 16:42:08 -07:00
Aaron Patterson
365c93b7cd
speed up duplicate migration detection
2010-10-03 16:39:48 -07:00
Aaron Patterson
40761c4bf3
reduce the number of calls to camelize
2010-10-03 16:36:43 -07:00
Aaron Patterson
e6583901e5
convertion MigrationProxy to a Struct, initialize instance variables
2010-10-03 16:32:27 -07:00
Aaron Patterson
341e71a1b9
dry up some migration logic
2010-10-03 16:23:07 -07:00
Aaron Patterson
8beda11fd3
no need to differentiate between nil and false in this case
2010-10-03 16:13:45 -07:00
Aaron Patterson
5154a464cc
lengths will be nil or an array
2010-10-03 15:35:56 -07:00
Aaron Patterson
7836616a64
remove a few function calls
2010-10-03 15:18:32 -07:00
Aaron Patterson
bd78d24bd8
be kind to the garbage collector and reuse our visitor object
2010-10-03 14:40:06 -07:00
Aaron Patterson
83633b807a
avoid creating objects when we can
2010-10-03 14:40:06 -07:00
José Valim
50215f9525
Rely on Rack::Session stores API for more compatibility across the Ruby world.
2010-10-03 21:24:22 +02:00
Carlos Antonio da Silva
4e93179ed3
Refactor AssociationCollection#include? with objects in memory
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-10-02 08:40:38 +02:00
Evgeniy Dolzhenko
ee31847a5a
Fix serialization :include option name
2010-10-01 14:26:17 +04:00
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
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
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