Commit Graph

7243 Commits

Author SHA1 Message Date
Sergey Nartimov b5f5e279a6 remove unnecessary require core_ext/string/encoding 2012-02-14 10:09:21 +03:00
Aaron Patterson 957da55702 Merge pull request #4834 from sskirby/fix_usage_of_psql_in_db_test_prepare
Fix usage of psql in db:test:prepare
2012-02-13 11:01:02 -08:00
Aaron Patterson 04c0aea47a Merge pull request #5000 from flavorpill/master-with-multidb-association-fix
Fix associations with per-class/multiple database connections
2012-02-13 09:11:33 -08:00
Aaron Patterson 3a5a01f7f6 Merge pull request #5012 from waseem/alias-reconnect-mysql2
Alias reconnect! to reset! for Mysql2 adapter since they have same behavior.
2012-02-13 09:05:29 -08:00
Vishnu Atrai 33e37b89fb Revert PR#5001 "removed unuseful require for reply as we are not using require model"
This reverts commit 7381596ea3.
2012-02-12 16:07:51 +05:30
Vishnu Atrai ed8fc19c6a fix build 5001, model reply is required in cases/primary_keys_test too! 2012-02-12 14:02:24 +05:30
Vishnu Atrai a62088a4da fix build #5001 reply model required in relations_test 2012-02-12 13:35:50 +05:30
Waseem Ahmad caa21e42b8 Alias reconnect! to reset! for Mysql2 adapter since they have same
behavior.
2012-02-12 12:07:45 +05:30
Sergey Nartimov d7942d4230 handle id attribute in PrimaryKey module 2012-02-11 22:03:07 +03:00
Santiago Pastorino 347e0a6033 Merge pull request #5003 from kennyj/fix_warning_20120211
Fix warning: The method name is a duplicate and wrong.
2012-02-11 06:44:56 -08:00
kennyj 7f14508eef Fix warning: The method name is a duplicate and wrong. 2012-02-11 23:27:14 +09:00
Karunakar (Ruby) 7381596ea3 removed unuseful require for reply as we are not using require model 2012-02-11 18:54:20 +05:30
Xavier Noria 5f548eb28e say unshift when you mean unshift (modulus prepend) 2012-02-11 04:58:40 -08:00
Aaron Patterson c50cb4aa39 PG column consults oid types when typecasting 2012-02-10 16:06:39 -08:00
Aaron Patterson fa6cda53eb dynamically populate casting objects via the pg_type table 2012-02-10 14:52:27 -08:00
Lars Kanis 9f8b4d1510 fix associations when using per class databases
would get ConnectionNotEstablished error because it always tried to use
ActiveRecord::Base's connection, even though it should be using the connection
of the model whose context we're operating in
2012-02-10 17:41:01 -05:00
Rick Martinez 30b6d4f7f1 added test for #3732 2012-02-10 17:35:22 -05:00
Aaron Patterson f7b915b507 Merge branch 'joelhoffman-postgres_schema_builder' into instance_reader
* joelhoffman-postgres_schema_builder:
  Also support writing the hstore back to the database
  Hstore values are all strings
  string_to_hstore / hstore_to_string, serializing
  don't test schema where hstore not installed
  schema dumper tests for hstore
  Additional hstore tests, supporting null values, better compliance with postgres docs
  add hstore to postgres native types and defaults

Conflicts:
	activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
2012-02-10 10:55:34 -08:00
Aaron Patterson 522b72fd28 Merge branch 'master' into instance_reader
* master:
  Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
  make Range#overlaps? accept Range of Time
  improved test case for partial indices
  Made schema dumper recognize partial indices' where statements
  Added where option to add_index to support postgresql partial indices
2012-02-10 10:41:24 -08:00
Aaron Patterson 3092324ef4 Merge pull request #4956 from mhfs/pg_partial_indices
Add support for partial indices to PostgreSQL adapter
2012-02-10 10:23:42 -08:00
Aaron Patterson a9a12700c7 fixing indentation, moving class methods together 2012-02-09 15:16:51 -08:00
Aaron Patterson 3f5b984bf3 removing dead code 2012-02-09 14:45:46 -08:00
Aaron Patterson e0eef111a3 typecast columns based on the returned types 2012-02-09 14:42:39 -08:00
Aaron Patterson e0cba3a0fa Merge branch 'master' into instance_reader
* master: (30 commits)
  Bump tzinfo. 0.3.31 was released on November 6, 2011.
  Fix GH #4909. Dependency on TZInfo move from AR to AS.
  moving ordered hash to normal hash because ruby 1.9.3 hash defaultly ordered one
  Refactored the OrderedHash related stuff
  Replaced OrderedHash usage with Ruby 1.9 Hash
  Replaced OrderedHash with Hash for ruby 1.9 series
  removed unnecessary code
  replacing the orderhash with hash for ruby-1.9
  Clean up some wording.
  Fix typo.
  test title changed corresponding to the test
  replaced active support ordered hash to ruby hash on active resource
  PostgreSQL does not work in the same way of the other adapters
  AR::Relation#pluck: improve to work with joins
  Fix match docs
  Fix attribute_before_type_cast for serialized attributes. Fixes #4837.
  Fix failing request test
  Fixes in AMo README
  Update README to mention lint.
  Trim down Active Model API by removing valid? and errors.full_messages
  ...
2012-02-09 13:50:08 -08:00
Aaron Patterson 6c50c07d8d fixing the list of cached columns 2012-02-09 13:49:24 -08:00
Marcelo Silveira aaffc2acd5 improved test case for partial indices 2012-02-09 19:04:07 -02:00
Aaron Patterson f26fcc05f6 only exclude serialized columns from cacheable columns 2012-02-09 12:08:07 -08:00
Vijay Dev e6c98b83cb Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	activerecord/lib/active_record/relation/query_methods.rb
2012-02-09 23:44:17 +05:30
kennyj 63dc9b46b1 Fix GH #4909. Dependency on TZInfo move from AR to AS. 2012-02-10 01:38:12 +09:00
Xavier Noria d36a88435e Merge pull request #4965 from raghunadhd/fix_hash
Refactored the OrderedHash related stuff
2012-02-09 05:07:15 -08:00
Karunakar (Ruby) fcbe18d9b5 moving ordered hash to normal hash because ruby 1.9.3 hash defaultly ordered one 2012-02-09 18:37:20 +05:30
Raghunadh 2ee85c39bd Refactored the OrderedHash related stuff 2012-02-09 18:27:11 +05:30
Joel 2dd0178229 Also support writing the hstore back to the database 2012-02-08 22:28:51 -08:00
Joel 5b318a84e7 Hstore values are all strings 2012-02-08 22:28:51 -08:00
Joel b04880cecc string_to_hstore / hstore_to_string, serializing 2012-02-08 22:28:51 -08:00
Joel 2967aecdaf don't test schema where hstore not installed 2012-02-08 22:28:51 -08:00
Joel 102ef98d32 schema dumper tests for hstore 2012-02-08 22:28:51 -08:00
Joel cf57211460 Additional hstore tests, supporting null values, better compliance with postgres docs 2012-02-08 22:28:51 -08:00
Joel a110789ca4 add hstore to postgres native types and defaults 2012-02-08 22:28:50 -08:00
Marcelo Silveira 7ef22fce7c Made schema dumper recognize partial indices' where statements 2012-02-09 03:28:11 -02:00
Marcelo Silveira d70e0236df Added where option to add_index to support postgresql partial indices
The `add_index` method now supports a `where` option that receives a
string with the partial index criteria.

    add_index(:accounts, :code, :where => "active")

    Generates

    CREATE INDEX index_accounts_on_code ON accounts(code) WHERE active
2012-02-09 01:20:52 -02:00
Aaron Patterson f86b198426 removed unnecessary translator object 2012-02-08 15:27:43 -08:00
Aaron Patterson 857bd73272 use the key name yielded to the fetch block 2012-02-08 15:16:07 -08:00
Aaron Patterson 69e84e10ec return early if the cast attribute has been cached 2012-02-08 14:59:48 -08:00
Aaron Patterson 3f97a97fc0 always call `read_attribute` from the reader method 2012-02-08 14:42:20 -08:00
Aaron Patterson e54d5cc5da use the pg column to cast values 2012-02-08 11:31:55 -08:00
Rafael Mendonça França 78a6b6a5fd PostgreSQL does not work in the same way of the other adapters 2012-02-08 16:38:31 -02:00
Bogdan Gusiev a379cb2fb5 AR::Relation#pluck: improve to work with joins 2012-02-08 16:37:27 +02:00
Jon Leighton 75ffd8701d Fix attribute_before_type_cast for serialized attributes. Fixes #4837. 2012-02-07 23:36:22 +00:00
Aaron Patterson 0f1b7591cf cache attribute if it is supposed to be cached 2012-02-07 14:37:19 -08:00