aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* `@destroyed` should always be set to `false` when an object is duped.Kuldeep Aggarwal2014-04-191-0/+4
|
* Regression test for irregular inflection on has_manyArthur Neves2014-04-181-0/+6
| | | | | | | Also add a Changelog entry [related #9702] [fixes #8928]
* Changed the NullRelation so that when count is called with #group it will ↵Eric Chahin2014-04-161-0/+6
| | | | | | | properly return an empty hash instead of zero. Fixes issue #14721 Conflicts: activerecord/CHANGELOG.md
* SQL Like escaping helper method. [Rob Gilson & Yves Senn]Rob Gilson2014-04-161-0/+16
| | | | | | | | | Closes #14222. This is a follow up to #6104 This does not have the backwards compatibility issues brought up in implementation to break.
* Add CHANGELOG entry for #14766 [ci skip]Rafael Mendonça França2014-04-151-0/+6
|
* Merge pull request #14592 from ↵Rafael Mendonça França2014-04-131-0/+13
|\ | | | | | | | | | | | | | | | | laurocaetano/equality_between_relation_and_collection_proxy The comparison between `Relation` and `CollectionProxy` should be consistent. Conflicts: activerecord/CHANGELOG.md
| * The comparison between `Relation` and `CollectionProxy` should be consistent.Lauro Caetano2014-04-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | Example: author.posts == Post.where(author_id: author.id) # => true Post.where(author_id: author.id) == author.posts # => true Fixes #13506
* | Add a changelog entry for #14546 [ci skip]Robin Dupret2014-04-131-0/+14
|/
* New CHANGELOG entries are in to top of fileRafael Mendonça França2014-04-111-7/+7
|
* Merge pull request #14711 from ↵Rafael Mendonça França2014-04-111-0/+7
|\ | | | | | | | | | | swoker/activerecord_fix_aggregate_methods_with_select Activerecord fix aggregate methods with select
| * Fix error for aggregate methods with select, see issue #13648Simon Woker2014-04-101-0/+7
| |
* | PostgreSQL, warn once per connection per missing OID. Closes #14275.Yves Senn2014-04-111-0/+6
| | | | | | | | [Yves Senn & Matthew Draper]
* | PostgreSQL, adapter automatically reloads it's type map. Closes #14678.Yves Senn2014-04-111-0/+7
| | | | | | | | [Yves Senn & Matthew Draper]
* | Merge pull request #12829 from iantropov/issue_insert_via_hmt_scope_3548Rafael Mendonça França2014-04-101-0/+6
|\ \ | | | | | | | | | | | | | | | | | | Fix insertion of records for hmt association with scope Conflicts: activerecord/CHANGELOG.md
| * | Fix insertion of records for hmt association with scope, fix #3548Ivan Antropov2013-11-171-0/+6
| | |
* | | Merge branch 'master' into rm-uuid-fixturesRafael Mendonça França2014-04-101-0/+28
|\ \ \ | | |/ | |/| | | | | | | | | | Conflicts: activerecord/CHANGELOG.md activesupport/CHANGELOG.md
| * | make enums distinct per classEvan Whalen2014-04-071-0/+7
| | |
| * | Merge pull request #14579 from senny/pg/remove_string_limitRafael Mendonça França2014-04-041-0/+6
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | PostgreSQL, remove varchar limit. Conflicts: activerecord/CHANGELOG.md
| | * | PostgreSQL and SQLite, remove varchar limit. [Vladimir Sazhin & Toms Mikoss ↵Yves Senn2014-04-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | & Yves Senn] There is no reason for the PG adapter to have a default limit of 255 on :string columns. See this snippet from the PG docs: Tip: There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.
| * | | Add CHANGELOG entry for #11650 [ci skip]Rafael Mendonça França2014-04-041-0/+6
| | | |
| * | | Merge pull request #14562 from jefflai2/collection_proxyRafael Mendonça França2014-04-041-0/+9
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | CollectionProxy uses the arel of its association's scope. Conflicts: activerecord/CHANGELOG.md
| | * | CollectionProxy uses the arel of its association's scope.Jefferson Lai2014-04-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | CollectionProxy should be able to reuse the behavior (methods) of its parent class, but with its own state. This change allows CollectionProxy to use the arel object corresponding to its association's scope.
* | | | Merge pull request #12016 from roderickvd/uuid_fixesRafael Mendonça França2014-04-041-0/+6
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Auto-generate stable fixture UUIDs on PostgreSQL Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/fixtures.rb activerecord/test/cases/adapters/postgresql/uuid_test.rb activesupport/CHANGELOG.md
| * | | Auto-generate stable fixture UUIDs on PostgreSQL.Roderick van Domburg2014-01-071-0/+10
| | | | | | | | | | | | | | | | Fixes: #11524
* | | | Block a few default Class methods as scope name.Arthur Neves2014-04-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Add tests to make sure scopes cannot be create with names such as: private, protected, public. Make sure enum values don't collide with those methods too.
* | | | Merge pull request #14572 from laurocaetano/with_options_and_scopeRafael Mendonça França2014-04-031-0/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error when using `with_options` with lambda. Conflicts: activerecord/CHANGELOG.md
| * | | | Fix error when using `with_options` with lambda.Lauro Caetano2014-04-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was causing error when using `with_options` passing a lambda as its last argument. class User < ActiveRecord::Base with_options dependent: :destroy do |assoc| assoc.has_many :profiles, -> { where(active: true) } end end It was happening because the `option_merger` was taking the last argument and checking if it was a Hash. This breaks the HasMany usage, because its last argument can be a Hash or a Proc. As the behavior described in this test: https://github.com/rails/rails/blob/master/activesupport/test/option_merger_test.rb#L69 the method will only accept the lambda, this way it will keep the expected behavior. See 9eaa0a34
* | | | | Merge pull request #14569 from matthewd/sqlite_relative_deprecatedRafael Mendonça França2014-04-031-0/+8
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Revise 'sqlite3:' URL handling for smoother upgrades Conflicts: activerecord/CHANGELOG.md
| * | | | Complete change of `sqlite3:///` path handlingMatthew Draper2014-04-031-0/+8
| | | | | | | | | | | | | | | | | | | | That which was now relative is now absolute.
| * | | | Revise 'sqlite3:' URL handling for smoother upgradesMatthew Draper2014-04-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the 4.0 behaviour for 'sqlite3:///', but deprecate it. We'll change to the absolute-path interpretation in 4.2. The current "correct" spellings for in-memory, relative, and absolute URLs, respectively, are: sqlite3::memory: sqlite3:relative/path sqlite3:/full/path Substantially reverses/defers fbb79b517f3127ba620fedd01849f9628b78d6ce. Uncovered by @guilleiguaran while investigating #14495, though that sounds like a different issue.
* | | | | Treat blank UUID values as nilDmitry Lavrov2014-04-031-0/+8
|/ / / /
* | / / PostgreSQL, Support for materialized views. [Dave Lee & Yves Senn]Dave Lee2014-04-021-0/+4
| |/ / |/| | | | | | | | | | | Expand the query used in #table_exists? to include materialized views in the kinds of relations it searches.
* | | PostgreSQL, register custom domains. Closes #14305.Yves Senn2014-04-011-0/+4
| | | | | | | | | | | | | | | | | | | | | This patch registers custom domains in our OID-type_map. They will behave exactly as the type specified by `pg_type.typbasetype`. /cc @matthewd
* | | PostgreSQL determine `Column#type` through corresponding OID. #7814Yves Senn2014-04-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I ran the whole test suite and compared the old to the new types. Following is the list of types that did change with this patch: ``` DIFFERENT TYPE FOR mood: NEW: enum, BEFORE: DIFFERENT TYPE FOR floatrange: NEW: floatrange, BEFORE: float ``` The `floatrange` is a custom type. The old type `float` was simply a coincidence form the name `floatrange` and our type-guessing.
* | | fix bug on non empty defaults for pg array columnsLuke Steensen2014-03-301-0/+6
| | | | | | | | | | | | fixes #10613
* | | Merge pull request #14469 from tiegz/timestamp_inheritance_fixRafael Mendonça França2014-03-271-0/+4
| | | | | | | | | | | | Swap Timestamp/Callbacks order in ActiveRecord::Base
* | | AR .persisted? throws SystemStackError for an unsaved model with achrisfinne2014-03-271-0/+7
| | | | | | | | | | | | custom primary_key that didn't save due to validation error
* | | ActiveRecord/ActiveModel '#validate' alias for 'valid?'Henrik Nyh2014-03-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | It's unintuitive to call '#valid?' when you want to run validations but don't care about the return value. The alias in ActiveRecord isn't strictly necessary (the ActiveModel alias is still in effect), but it clarifies.
* | | Improve CHANGELOG entryRafael Mendonça França2014-03-261-3/+5
| | |
* | | Fixes bugs for using indexes in CREATE TABLE by adding checks for table ↵Steve Rice2014-03-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | existence Also: - updates tests by stubbing table_exists? method - adds entry for creating indexes in CREATE TABLE to changelog
* | | Revert "Merge pull request #8313 from alan/only_save_changed_has_one_objects"Rafael Mendonça França2014-03-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6e3ab3e15faf782f6a937ccf5574a4fb63e3e353, reversing changes made to 39e07b64ce3f4bb55e60ba0266e677f8e4f4893a. Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/autosave_association_test.rb
* | | clarify CHANGELOG [ci skip].Yves Senn2014-03-251-8/+2
| | |
* | | Fix Generation of proper migration whenKuldeep Aggarwal2014-03-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveRecord::Base.pluralize_table_names = false. Previously, generation a migration like this: rails g migration add_column_name_to_user name would not generating the correct table name. Fixes #13426.
* | | Merge pull request #12955 from joshwilliams/masterYves Senn2014-03-201-0/+5
|\ \ \ | | | | | | | | Postgres schema: Constrain sequence search classid
| * | | Postgres schema: Constrain sequence search classidJosh Williams2014-03-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pk_an_sequence_for query previously joined against pg_class's oid for rows in pg_depend, but pg_depend's objid may point to other system tables, such as pg_attrdef. If a row in one of those other tables coincidentally has the same oid as an (unrelated) sequence, that sequence name may be returned instead of the real one. This ensures that only the pg_depend entries pointing to pg_class are considered.
* | | | Improve touch docs with extra attributes passed in [ci skip]Carlos Antonio da Silva2014-03-201-6/+3
| | | |
* | | | Merge pull request #14423 from yakko/persistence-touches-manyCarlos Antonio da Silva2014-03-201-0/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveRecord#touch should accept multiple attributes Conflicts: activerecord/CHANGELOG.md
| * | | | ActiveRecord#touch should accept multiple attributes #14423Thiago Pinto2014-03-191-0/+12
| |/ / /
* / / / only dump schema information if migration table exists. Closes #14217Yves Senn2014-03-201-0/+7
|/ / /
* | | Reap connections based on owning-thread deathMatthew Draper2014-03-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. not a general timeout. Now, if a thread checks out a connection then dies, we can immediately recover that connection and re-use it. This should alleviate the pool exhaustion discussed in #12867. More importantly, it entirely avoids the potential issues of the reaper attempting to check whether connections are still active: as long as the owning thread is alive, the connection is its business alone. As a no-op reap is now trivial (only entails checking a thread status per connection), we can also perform one in-line any time we decide to sleep for a connection.