aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | Warm up Symbols with where methodAkira Matsuda2014-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like #first wasn't warm enough...
* | | | | | | | | Merge pull request #16502 from bogdan/where-hash-nested-relationSantiago Pastorino2014-08-142-3/+24
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | [Regression 4.0 -> 4.1] Fixed AR::Relation#where edge case with Hash and other Relation
| * | | | | | | | | Fixed AR::Relation#where edge case with Hash and other RelationBogdan Gusiev2014-08-142-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: Author.where(posts: { author_id: Author.where(country_id: 1) }).joins(:posts)
* | | | | | | | | | Ignore SCHEMA queries in some habtm testsAkira Matsuda2014-08-141-4/+4
| | | | | | | | | |
* | | | | | | | | | Merge pull request #8813 from ↵Yves Senn2014-08-143-1/+26
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | greyblake/dont_write_timestamps_if_they_are_not_attributes Write timestamps only if there are timestamps columns Conflicts: activerecord/CHANGELOG.md
| * | | | | | | | | | Do not try to write timestamps if they are missing #8813Potapov Sergey2014-02-163-1/+29
| | | | | | | | | | |
* | | | | | | | | | | Make sure that fixtures are loaded before findingAkira Matsuda2014-08-141-0/+4
| | | | | | | | | | |
* | | | | | | | | | | FormatAkira Matsuda2014-08-141-2/+2
| | | | | | | | | | |
* | | | | | | | | | | Clear validators before and after each testAkira Matsuda2014-08-142-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or some tests fail when run in random order
* | | | | | | | | | | Finally! None of our tests are order_dependent!Akira Matsuda2014-08-141-5/+0
| |_|_|_|_|_|_|_|/ / |/| | | | | | | | |
* | | | | | | | | | Merge pull request #16491 from akshay-vishnoi/doc-changesYves Senn2014-08-133-4/+4
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | [ci skip] fix spelling of overridden
| * | | | | | | | | | [ci skip] fix spelling of overrideAkshay Vishnoi2014-08-133-4/+4
| | |_|_|_|_|/ / / / | |/| | | | | | | |
* | | | | | | | | | Merge pull request #16489 from tomkadwill/updating_options_to_new_styleYves Senn2014-08-131-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | [ci skip] Updated where scope documentation to conform to new style
| * | | | | | | | | | [ci skip] Updated where scope to conform to new styleTom Kadwill2014-08-131-1/+1
| | |_|_|/ / / / / / | |/| | | | | | | |
* | | | | | | | | | `index_exists?` with `:name` checks specified columns.Yves Senn2014-08-133-7/+30
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Yves Senn & Matthew Draper] The column check was embodied in the defaul index name. If the :name option was used, the specified columns were not verified at all. Given: ``` assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma) ``` That index could have been defined on any field, not necessarily on `:foo_id`.
* | | | | | | | | :bomb:Rafael Mendonça França2014-08-121-1/+1
| | | | | | | | |
* | | | | | | | | Nobody sucks so nobody should call this awful method nameRafael Mendonça França2014-08-121-1/+1
|/ / / / / / / /
* | | | | | | | users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!Akira Matsuda2014-08-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes everyone's tests order dependent, which should never be done by the framework.
* | | | | | | | update error message to reflect that the record could have been destroyedlsylvester2014-08-112-1/+8
| |_|/ / / / / |/| | | | | |
* | | | | | | Merge pull request #16441 from ↵Santiago Pastorino2014-08-091-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tomkadwill/activerecord_associations_options_param [ci skip] Changed options to +options+ for rdoc
| * | | | | | | [ci skip] Changed options to +options+ for rdocTom Kadwill2014-08-091-4/+4
| | |_|_|/ / / | |/| | | | |
* / | | | | | Using delegated connection methodJoshua Delsman2014-08-081-1/+1
|/ / / / / /
* | | | | | [ci skip] Changed 'first argument' to '+name+ argument'Tom Kadwill2014-08-081-4/+4
| | | | | |
* | | | | | Rephrase how we explain RecordInvalid exception in the context ofZachary Scott2014-08-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `#create!` regarding validations in contrast to the behavior of `#create`. Also describe creating multiple objects using an array of hashes as the +attributes+ parameter. [ci skip] /cc #16384
* | | | | | Merge pull request #16384 from tomkadwill/improved_create_documentationZachary Scott2014-08-071-2/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | [ci skip] Added +object+ and +attributes+ to create! description for rdoc
| * | | | | | [ci skip] Updated create! documentation description and added +attributes+ ↵Tom Kadwill2014-08-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for rdoc
* | | | | | | use the uri parser so that newer version of Ruby workAaron Patterson2014-08-071-1/+1
| | | | | | |
* | | | | | | change to empty? from blank?tsukasaoishi2014-08-081-1/+1
| | | | | | |
* | | | | | | Tables existence check query is executed in large quantitiestsukasaoishi2014-08-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Rails starts, tables existence check query is executed number of models. In case of mysql, SHOW TABLES LIKE 'table1'; SHOW TABLES LIKE 'table2'; SHOW TABLES LIKE 'table3'; ... SHOW TABLES LIKE 'table999'; Add process to get the names of all tables by one query.
* | | | | | | Define id_was to get the previous value of the primary keyRafael Mendonça França2014-08-063-1/+28
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when we call id_was and we have a custom primary key name Active Record will return the current value of the primary key. This make impossible to correctly do an update operation if you change the id. Fixes #16413
* | | | | | schema rake tasks are specific about the configuration to act on.Yves Senn2014-08-064-22/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rake tasks and the `DatabaseTakss` adapter classes used to assume a configuration at some places. This forced the rake tasks to establish a specific connection before calling into `load_schema`. After #15394 this started to cause issues because it could `purge` the wrong database before loading the schema.
* | | | | | Revert "Revert "Merge pull request #15394 from ↵Yves Senn2014-08-063-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | morgoth/fix-automatic-maintaining-test-schema-for-sql-format"" This reverts commit 5c87b5c5248154cf8aa76cce9a24a88769de022d.
* | | | | | Merge pull request #16364 from arthurnn/make_transaction_one_classJeremy Kemper2014-08-052-72/+56
|\ \ \ \ \ \ | | | | | | | | | | | | | | Clarify Transaction responsibilities by breaking unneeded inheritance hierarchy.
| * | | | | | Cleanup Transaction inheritance.Arthur Neves2014-08-052-72/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transaction class doesnt need to encapsulate the transaction state using inheritance. This removes all Transaction subclasses, and let the Transaction object controls different actions based on its own state. Basically the only actions would behave differently are `being`,`commit`,`rollback` as they could act in a savepoint or in a real transaction.
* | | | | | | Merge pull request #16404 from bogdan/move-create-with-bangCarlos Antonio da Silva2014-08-052-15/+12
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Moved #create! method from Validations to Persistence module
| * | | | | | | Moved #create! method from Validations to Persistence moduleBogdan Gusiev2014-08-052-15/+12
| | |_|/ / / / | |/| | | | |
* / | | | | | Remove unused text? predicate method and delegationCarlos Antonio da Silva2014-08-052-5/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method has been removed in 09206716f8695f6b8467f15c1befa5a4c3c10978 (PR #16074), but the delegation was apparently missed, and one instance of the method was added back with the addition of OID::Xml in 336be2bdf7dfa1b31879d0ab27e5f3101b351923 (PR #16072), so we can safely rm both.
* | | | | | Don't delegate Reflection#chain to ThroughAssociationeileencodes2014-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't be delegating chain to ThroughAssociation since the only place that needs to call it is `target_scope`. Instead we can call `reflecion.chain`.
* | | | | | Merge pull request #16333 from ↵Yves Senn2014-08-043-4/+26
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | joker1007/fix_decimal_cast_from_float_with_large_precision Fix type casting to Decimal from Float with large precision Conflicts: activerecord/CHANGELOG.md
| * | | | | | Fix type casting to Decimal from Float with ...joker10072014-08-013-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I defines large precision column at RDBMS, I assigns float value, raise ArgumentError (precision too large).
* | | | | | | Merge pull request #16378 from ↵Rafael Mendonça França2014-08-021-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JackDanger/doc-fix-in-join-association-build_constraint [doc] updating documented parameter for build_constraint
| * | | | | | | updating documented parameter for build_constraintJack Danger Canty2014-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates documentation in line with changes made in 743b67508e2027e1d086142ccbec47a19fc943f6
* | | | | | | | Merge pull request #16377 from JackDanger/doc-fix-in-association-reflectionEileen M. Uchitelle2014-08-021-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fixes small error in ActiveRecord::Reflection docs
| * | | | | | | | Fixes small error in ActiveRecord::Reflection docsJack Danger Canty2014-07-311-1/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | Merge pull request #16374 from rajcybage/consistency_minitestRafael Mendonça França2014-08-022-3/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | rename MiniTest to Minitest
| * | | | | | | | rename MiniTest to MinitestRajarshi Das2014-08-022-3/+3
| | | | | | | | |
* | | | | | | | | Deprecate source_macroeileencodes2014-08-022-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `source_macro` is no longer used in any ActiveRecord code. I've chosen to deprecate it because it was not marked as nodoc and may be in use outside of rails source.
* | | | | | | | | Use available method rather than macro name checkingCarlos Antonio da Silva2014-07-311-1/+1
| | | | | | | | |
* | | | | | | | | Rename method for clarityCarlos Antonio da Silva2014-07-311-3/+3
| |_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | Ruby generally does not use the is_* prefix on predicate methods.
* | | | | | | | Replace ClosedTransaction with NullTransactionArthur Neves2014-07-312-8/+5
| | | | | | | |