aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | add missing `:nodoc:` for `AutosaveAssociation::ClassMethods` [ci skip]Yves Senn2015-10-141-1/+1
| | | | | | | |
* | | | | | | | fix broken RDoc markup. Use `<tt>` instead of `+`. [ci skip]Yves Senn2015-10-142-7/+7
| | | | | | | |
* | | | | | | | fix RDoc list markup in `DatabaseTasks`. [ci skip]Yves Senn2015-10-141-7/+7
| | | | | | | |
* | | | | | | | add missing :nodoc: to `ActiveRecord::Scoping`. [ci skip]Yves Senn2015-10-141-2/+2
| | | | | | | |
* | | | | | | | Merge pull request #21635 from sideshowcoder/ar_type_docs_fixArthur Nogueira Neves2015-10-131-1/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Documentation ActiveRecord Attributes API code fix
| * | | | | | | ActiveRecord Attributes API code fixPhilipp Fehre2015-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I came across this while trying it out, with the provided code the `MoneyType` does not save as it complains that `Fixnum` does not define `include?`. I think the sensible thing is to check if it already is a `Numeric`.
* | | | | | | | `private def` breaks RDoc. Move meathod to preserve the docs.Yves Senn2015-10-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rdoc parser seems to trip on the `private def` construct. Public methods following a method defined with `private def` are not visible inside the module docs but are appended to the top-most module. For example the method `ActiveRecord::QueryMethods#distinct` was listed under `ActiveRecord#distinct`. /cc @sgrif
* | | | | | | | docs, :nodoc: `FromClause`, `QueryAttribute` and `WhereClauseFactory`.Yves Senn2015-10-133-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | docs, add missing `:nodoc: for `Associations::Builder`. [ci skip]Yves Senn2015-10-137-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is only used internally. We should keep it out of public documentation. This patch adds nodoc for `ActiveRecord::Associations::Builder` and everything nested within.
* | | | | | | | nodoc `ActiveRecord::ForeignAssociation`. [ci skip]Yves Senn2015-10-131-1/+1
| | | | | | | |
* | | | | | | | document `EagerLoadPolymorphicError`. [ci skip]Yves Senn2015-10-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This error is raised in certain situations when eager loading polymorphic associations. We even mention it in our docs. It should be included in our API. Conflicts: activerecord/lib/active_record/associations.rb
* | | | | | | | nodoc `ActiveRecord::Attribute::UserProvidedDefault`. [ci skip]Yves Senn2015-10-131-1/+1
| | | | | | | |
* | | | | | | | docs, recognize code examples as Ruby in `Relation::QueryMethods` [ci skip]Yves Senn2015-10-131-33/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also unify the format of code example output. Only use `# =>` if the actual return value is described. Otherwise simply use `#`. Conflicts: activerecord/lib/active_record/relation/query_methods.rb
* | | | | | | | docs, nodoc internal Active Record `DelegateCache`. [ci skip]Yves Senn2015-10-131-3/+3
| | | | | | | |
* | | | | | | | docs, fix highlighting for code examples in calculations.rb [ci skip]Yves Senn2015-10-131-20/+20
| | | | | | | |
* | | | | | | | `:to_table` when adding a fk through `add_reference`.Yves Senn2015-10-134-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #21563. The `name` argument of `add_references` was both used to generate the column name `<name>_id` and as the target table for the foreign key `name.pluralize`. It's primary purpose is to define the column name. In cases where the `to_table` of the foreign key is different than the column name we should be able to specify it individually.
* | | | | | | | Merge pull request #21938 from ↵Yves Senn2015-10-135-92/+107
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/move_schema_dumping_methods_into_appropriate_files Move the methods for schema dumping into `{mysql,postgresql}/schema_dumper.rb`
| * | | | | | | | Move the methods for schema dumping into `{mysql,postgresql}/schema_dumper.rb`Ryuta Kamizono2015-10-135-92/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current master branch includes many schema dumping improvements. It extract these features to the appropriate files.
* | | | | | | | | Merge pull request #21288 from yahonda/mysql_requires_passwordArthur Nogueira Neves2015-10-122-5/+5
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Allow mysql and mysql2 tests run by database user with password
| * | | | | | | | Allow mysql and mysql2 tests run by database user with passwordYasuo Honda2015-08-182-5/+5
| | | | | | | | |
* | | | | | | | | Merge pull request #21931 from paul/bugfix/remove-deprecated-pg_dump-flagYves Senn2015-10-123-5/+9
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove deprecated pg_dump -i flag
| * | | | | | | | | Remove deprecated pg_dump -i flagPaul Sadauskas2015-10-101-1/+1
| | | | | | | | | |
* | | | | | | | | | Move schema creation class into `mysql/schema_creation.rb`Ryuta Kamizono2015-10-112-53/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current master branch includes many schema creation improvements in MySQL. It extract these features to the appropriate file.
* | | | | | | | | | Move schema definition classes into `mysql/schema_definitions.rb`Ryuta Kamizono2015-10-112-62/+70
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current master branch includes many schema definition improvements in MySQL. It extract these features to the appropriate file.
* | | | | | | | | Merge pull request #11410 from bogdan/increment-concurencyJeremy Daer2015-10-105-40/+42
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make AR#increment! and #decrement! concurrency-safe
| * | | | | | | | | Make #increment! and #decrement! methods concurency safeBogdan Gusiev2015-10-055-40/+41
| | | | | | | | | |
* | | | | | | | | | Avoid leaking the first relation we call #first onMatthew Draper2015-10-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous implementation, the block passed to define_singleton_method, which will live forever as the method body, captures the parameters (args and block) in its enclosure. For the current_scope registry, that can include an AR::Relation.
* | | | | | | | | | Merge pull request #21911 from tommyblue/masterRafael Mendonça França2015-10-081-3/+8
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Modify the scope method documentation
| * | | | | | | | | | Modify the scope method documentationTommaso Visconti2015-10-081-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a paragraph to the documentation of the `ActiveRecord::Scoping::Named.scope` method, explaining that the method is intended to return an ActiveRecord::Relation object to be composable with other scopes. In the case that in the case that `nil` or `false` are returned, the method returns an `all` relation instead. This unexpected behaviour is mentioned in #19249 #14256 #21465 and #21882 and wasn't documented at all. This commit adds this documentation.
* | | | | | | | | | | Remove unused requireakihiro172015-10-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `require 'active_support/core_ext/string/filters'` was added in b3bfa36. However, it is no longer needed from 3ae981814.
* | | | | | | | | | | Merge pull request #21913 from kamipo/fix_subsecond_precision_supported_versionSean Griffin2015-10-081-3/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix subsecond precision supported version
| * | | | | | | | | | | Fix subsecond precision supported versionRyuta Kamizono2015-10-081-3/+1
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fractional Seconds supported version is 5.6.4 or higher. http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
* / / / / / / / / / / Remove unused `pk_and_sequence_for` in AbstractMysqlAdapterRyuta Kamizono2015-10-083-31/+4
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `pk_and_sequence_for` is implemented for PG and MySQL adapters (not implemented for Sqlite3 adapter). But MySQL adapters are not using `pk_and_sequence_for` already.
* | | | | | | | | | [ci skip] Change 'an URL' to 'a URL' as URL doesn't have a vowel soundtanmay30112015-10-061-1/+1
| | | | | | | | | |
* | | | | | | | | | Implement equality comparison on `AttributeSet` and friendsSean Griffin2015-10-063-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any gems or libraries which do work with serialization or YAML will ultimately need to compare these objects (albeit indirectly) to ensure correctness. These will likely never get used internally (as they're slow), but we should still expose them for others.
* | | | | | | | | | Remove unused block argumentamitkumarsuroliya2015-10-061-1/+1
| | | | | | | | | |
* | | | | | | | | | Merge pull request #21872 from kirs/chore/attributes-cleanupSean Griffin2015-10-051-3/+0
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | No need to declare ActiveRecord::Attributes::Type
| * | | | | | | | | | No need to declare ActiveRecord::Attributes::TypeKir Shatrov2015-10-051-3/+0
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #21033 from dgynn/preloader_build_scope_tuningArthur Nogueira Neves2015-10-041-1/+3
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Skip _select! call unless needed for preloader
| * | | | | | | | | | | skip _select! call unless :select values are specifiedDave Gynn2015-07-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the default scope will select all fields. removing this improves performance and reduces String creation.
* | | | | | | | | | | | Merge pull request #21005 from jaredbeck/patch-1Arthur Nogueira Neves2015-10-041-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Docs: Update options for add_reference
| * | | | | | | | | | | | Docs: Update options for add_referenceJared Beck2015-07-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | | | | [ci skip] Fix ActiveRecord::Relation#update documentationakihiro172015-10-051-5/+5
| |_|_|_|_|_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * before ``` people = Person.where(group: 'expert') people.update(group: 'masters') Note: Updating a large number of records will run a UPDATE query for each record, which may cause a performance issue. So if it is not needed to run callbacks for each update, it is preferred to use <tt>update_all</tt> for updating all records using a single query. ``` * after ``` people = Person.where(group: 'expert') people.update(group: 'masters') ``` Note: Updating a large number of records will run an UPDATE query for each record, which may cause a performance issue. So if it is not needed to run callbacks for each update, it is preferred to use <tt>update_all</tt> for updating all records using a single query.
* | | | | | | | | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-10-042-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | [ci skip] Fix commentyui-knk2015-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `alias :migrations_path= :migrations_paths=`, so `migrations_path = some_string` is correct.
| * | | | | | | | | | | | adding basic change_column and remove_columns in CommandRecorder ↵Gaurav Sharma2015-09-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | documentations [ci skip]
* | | | | | | | | | | | | Merge pull request #21860 from vngrs/wrong_usage_of_a_in_docEileen M. Uchitelle2015-10-034-4/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrong usage of 'a' in docs fixed [ci skip]
| * | | | | | | | | | | | | Wrong usage of 'a' in docs fixed [ci skip]Mehmet Emin İNAÇ2015-10-034-4/+4
| | |_|_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | |
* / | | | | | | | | | | | Add Singleton in NullMutationTracker classacapilleri2015-10-032-1/+3
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to reduce allocation of same object
* | | | | | | | | | | | Merge pull request #21839 from andyatkinson/remove-unusued-scopesSean Griffin2015-10-023-10/+0
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused scopes