Commit Graph

6069 Commits

Author SHA1 Message Date
Andrew White fa21b73ebb Return false for exists? with new records - fixes #6199. 2012-05-10 23:16:40 +01:00
Vijay Dev 5277d550d9 remove unnecessary 'examples' noise [ci skip] 2012-05-11 00:29:39 +05:30
Jeremy Kemper 42a14c436c Merge pull request #4254 from alexeymuranov/my-nicify-fixtures-rb
Rename variables and remove unused code in fixtures.rb
2012-05-09 19:01:03 -07:00
Aaron Patterson df0324f7dd Merge pull request #5362 from zenprogrammer/quoting_bug
Fixed bug in ActiveRecord that caused classes to be quoted incorrectly
2012-05-09 16:12:07 -07:00
Alexey Muranov 12ceb4581a Rename some variables
Rename some parameters and instance and local variables, mostly in fixtures.rb.  Also remove an unused assignment to an instance variable.

There are minor code changes.
2012-05-09 18:46:13 +02:00
Hemant Kumar 44d1804b0a Fix transaction state not changing when after record gets commited 2012-05-09 17:32:15 +05:30
Alexey Muranov caeca1f69b Remove unused private method in fixtures.rb
Remove the unused private method ActiveRecord::Fixtures#yaml_fixtures_key(path).
2012-05-09 11:25:19 +02:00
Alexey Muranov af44c2ba4a Remove unused parameter in ::instantiate_fixtures
Second parameter of Fixtures::instantiate_fixtures was not used, so i removed it.
2012-05-09 11:25:19 +02:00
Vijay Dev 7918d7bf5c Merge branch 'master' of github.com:lifo/docrails 2012-05-08 23:56:25 +05:30
Rob Zolkos 89fff791fa Doc for ActiveRecord::Result empty? method 2012-05-07 21:43:05 +10:00
Piotr Sarnacki 93742701b5 Use deep_dup in aciverecord default columns assignment 2012-05-06 11:13:15 -07:00
Mitch Crowe f9646c8a63 SpawnMethods#merge returns the intersection when passed an array, and not the union. Update the documentation to reflect this. 2012-05-05 18:34:54 -07:00
Jeremy Kemper bad119cae5 Merge pull request #6173 from mhfs/takes_instead_first
Use `take` instead of `first` to avoid unwanted implicit ordering. Closes #6147.
2012-05-05 15:19:36 -07:00
Jeremy Kemper 4d8bc1da88 Merge pull request #6069 from mipearson/use_strict_mode_in_mysql
Use strict mode in mysql
2012-05-05 15:12:32 -07:00
Jon Leighton 3af9e721b4 Merge pull request #6054 from flexoid/column-fix
Prevent creating valid time-like objects from blank string from db
2012-05-05 13:40:42 -07:00
Jon Leighton 06c787d235 Revert "Merge pull request #5494 from armstrjare/active_record_relation_keep_association_join_context_on_merge"
This reverts commit dcd04e7617, reversing
changes made to 58a49875df.
2012-05-05 21:36:24 +01:00
Egor Lynko 7f160b06a2 Prevent creating valid time-like objects from blank string from db
Issue #6045
2012-05-05 23:35:25 +03:00
Jon Leighton dcd04e7617 Merge pull request #5494 from armstrjare/active_record_relation_keep_association_join_context_on_merge
ActiveRecord::Relation - maintain context of joined associations on merges
2012-05-05 13:01:57 -07:00
Marcelo Silveira 56bf1f7455 Use `take` instead of `first` to avoid unwanted implicit ordering (fixes #6147) 2012-05-05 12:10:52 -03:00
Michael Pearson 7c4d331133 Add config option, rdoc, tests for mysql(2) STRICT_ALL_TABLES mode. 2012-05-05 18:53:45 +10:00
Michael Pearson 4b905606e3 Default to 'strict mode' in MySQL 2012-05-05 17:17:04 +10:00
Piotr Sarnacki c5176023a0 Duplicate column_defaults properly (closes #6115) 2012-05-04 23:00:41 -07:00
Piotr Sarnacki 2ec6ef5dda Change unless + ! into if 2012-05-04 22:58:37 -07:00
Aaron Patterson 58950ee224 Merge pull request #3713 from kf8a/master
postgresql adapter should quote not a number and infinity correctly for float columns
2012-05-04 16:47:35 -07:00
Jon Leighton 510cf0ad93 extract deprecated dynamic methods 2012-05-04 14:31:19 +01:00
Vijay Dev 3d9673d8f6 Merge branch 'master' of github.com:lifo/docrails 2012-05-04 17:51:15 +05:30
Vijay Dev b24f1ce138 Merge pull request #5650 from sekrett/master
Documentation fix: Change the example for habtm association to use proc according to changelog
2012-05-04 04:57:07 -07:00
Jon Leighton d1729b917f actually don't need to expand the aggregates at all 2012-05-04 12:50:07 +01:00
Jon Leighton 780e8939c0 #to_sym is unnecessary 2012-05-04 12:50:07 +01:00
Jon Leighton 4bd9482a1a de-globalise method 2012-05-04 12:50:07 +01:00
Jon Leighton 75a22814ef extract code from AR::Base 2012-05-04 12:50:07 +01:00
Jon Leighton 0c76a52c47 clean up implementation of dynamic methods. use method compilation etc. 2012-05-04 12:50:03 +01:00
Jared Armstrong 0d8cf53296 Allow ActiveRecord::Relation merges to maintain context of joined associations 2012-05-04 22:57:01 +12:00
Carlos Antonio da Silva 5d26c8f00a Fix issue with private kernel methods and collection associations. Closes #2508
Change CollectionProxy#method_missing to use scoped.public_send, to
avoid a problem described in issue #2508 when trying to use class
methods with names like "open", that clash with private kernel methods.
Also changed the dynamic matcher instantiator to send straight to
scoped, to avoid another roundtrip to method_missing.
2012-05-02 23:23:35 -03:00
Marcelo Silveira 878db1f4ef Use arel nodes instead of raw sql 2012-05-02 21:25:41 -03:00
Marcelo Silveira 2bf65caf56 Use Array#first instead of Array#[0] 2012-05-02 21:25:41 -03:00
Marcelo Silveira 1379375f93 Introducing `take` as a replacement to the old behavior of `first` 2012-05-02 21:25:40 -03:00
Marcelo Silveira 489166e114 Document `last`, check for primary key on default order and use quoted table and column names 2012-05-02 21:25:40 -03:00
Marcelo Silveira 07e5301e69 Made `first` finder consistent among database engines by adding a
default order clause (fixes #5103)
2012-05-02 21:25:24 -03:00
Edgars Beigarts 6d6907e40d Refactored remove_column 2012-05-02 10:28:12 +03:00
Edward Tsech 3305256c95 Add empty rows to improve readability. [ci skip] 2012-05-01 21:19:58 +02:00
Aaron Patterson 7d2df5fa62 Merge pull request #6089 from frodsan/delete_all_limit
delete_all raise an error if a limit is provided - fixes #4979
2012-05-01 12:12:07 -07:00
Edward Tsech d752eabde3 Add few lines to describe how aggregation part caching works. [ci skip] 2012-05-01 20:52:41 +02:00
Aaron Patterson b2a24a1578 Merge pull request #6092 from jsanders/issue_4001_error_typecasting_non_integer_castable
Don't type cast values that don't respond to to_i to 1
2012-05-01 10:41:45 -07:00
Hrvoje Šimić 068e8b20b5 simpler wording and explanations 2012-05-01 18:25:37 +02:00
Ben Pickles 60aee4ea0e Lowercase. 2012-05-01 16:38:35 +02:00
Vijay Dev 0c9e7b69d8 more edits [ci skip] 2012-05-01 19:18:47 +05:30
Vijay Dev 42ff22f33a Merge branch 'master' of github.com:lifo/docrails 2012-05-01 19:06:03 +05:30
Aaron Patterson de6a067078 return value of block is returned 2012-04-30 16:14:15 -07:00
Aaron Patterson f0182d5cb9 only yield to finder block if something is found 2012-04-30 16:14:15 -07:00