aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix wrong kwarg "record" from #18872claudiob2015-02-102-1/+2
| | | | | | | | | | | | PR #18772 changed the parameters of `stale?` to use `kwargs`. [As for this comment](https://github.com/rails/rails/pull/18872/files#r24456288) the default value for the `etag` parameter should be `record`, not `nil`. This commit fixes the code and introduces a test that: - passed before #18872 - fails on the current master (after #18772) - passes again after setting the default value of `etag` to `record`.
* Merge pull request #18872 from kaspth/kw-fresh_when-staleArthur Nogueira Neves2015-02-101-12/+10
|\ | | | | Convert stale? and fresh_when to use keyword arguments.
| * Convert stale? and fresh_when to use keyword arguments.Kasper Timm Hansen2015-02-101-12/+10
| |
* | Dont check bundler output on plugin generator testArthur Neves2015-02-101-4/+2
| |
* | Actually fix the buildSean Griffin2015-02-101-1/+1
| | | | | | | | Like for real this time. I checked.
* | Merge pull request #18877 from prathamesh-sonpatki/ar-changelog-typos-2Rafael Mendonça França2015-02-101-2/+2
|\ \ | | | | | | Fixed typos in ActiveRecord CHANGELOG [ci skip]
| * | Fixed typos in ActiveRecord CHANGELOG [ci skip]Prathamesh Sonpatki2015-02-111-2/+2
| | |
* | | Merge pull request #12257 from vipulnsward/end_on_find_in_batchesRafael Mendonça França2015-02-104-13/+50
|\ \ \ | | | | | | | | Add an option `end` to `find_in_batches`
| * | | Add an option `end_at` to `find_in_batches`Vipul A M2015-02-094-13/+50
| | | | | | | | | | | | | | | | that complements the `start`parameter to specify where to stop batch processing
* | | | Fix the buildSean Griffin2015-02-101-1/+1
| |/ / |/| |
* | | Refactor microsecond precision to be database agnosticSean Griffin2015-02-1011-84/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The various databases don't actually need significantly different handling for this behavior, and they can achieve it without knowing about the type of the object. The old implementation was returning a string, which will cause problems such as breaking TZ aware attributes, and making it impossible for the adapters to supply their logic for time objects.
* | | Merge pull request #18860 from ↵Rafael Mendonça França2015-02-101-1/+1
|\ \ \ | | | | | | | | | | | | | | | | alex-handley/enhancement/dependent_documentation_fix Documentation Fix: Corrects explanation of what happens when dependent is not set
| * | | [ci skip] corrects documentation for the default dependent behaviourAlex Handley2015-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | By default the foreign key will remain set with the parent id after destroy is fired.
* | | | Maintain a consistent order in `ActiveRecord::Base#attributes`Sean Griffin2015-02-102-1/+21
| | | | | | | | | | | | | | | | Fixes #18871
* | | | Merge pull request #18808 from carlosramireziii/i18n-doc-updateRobin Dupret2015-02-101-0/+19
|\ \ \ \ | |_|_|/ |/| | | Document lazy lookup behavior for controllers [ci skip]
| * | | Document lazy lookup behavior for controllersCarlos Ramirez III2015-02-031-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull request #7082 added lazy lookup to controllers using the translate method, but the documentation still stated that it was available for views only. [ci skip]
* | | | Change `LockingType` to use `DelegateClass`Sean Griffin2015-02-091-1/+1
| | | | | | | | | | | | | | | | Significantly faster than `SimpleDelegator`.
* | | | Merge pull request #18841 from yuki24/remove-warning-from-av-tags-translatorRafael Mendonça França2015-02-091-1/+3
|\ \ \ \ | | | | | | | | | | Remove warning from ActionView::Helpers::Tags::Translator
| * | | | Remove warning from ActionView::Helpers::Tags::TranslatorYuki Nishijima2015-02-081-1/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | This removes the following warning: /GitHub/rails/actionview/lib/action_view/helpers/tags/translator.rb:19: warning: private attribute?
* | | | Merge pull request #18849 from kamipo/array_type_is_a_part_of_sql_typeSean Griffin2015-02-092-19/+4
|\ \ \ \ | |_|_|/ |/| | | An array type is a part of `sql_type`
| * | | An array type is a part of `sql_type`Ryuta Kamizono2015-02-082-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | `sql_type` is reused in `lookup_cast_type`. If making it a part of `sql_type` when handled array option first, it isn't necessary to do again.
* | | | tests, reset global to previous value.Yves Senn2015-02-091-1/+3
| | | | | | | | | | | | | | | | | | | | The default of the global might change. It's better to reset it to what it was than a hardcoded value.
* | | | Merge pull request #18839 from ↵Yves Senn2015-02-091-10/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | yuki24/remove-warning-from-generators-named-base-test Remove warning from generator named base test
| * | | | Remove warning from generator named base testYuki Nishijima2015-02-081-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the following warning: railties/test/generators/named_base_test.rb:9: warning: method redefined; discarding old pluralize_table_names activesupport/lib/active_support/core_ext/class/attribute.rb:86: warning: previous definition of pluralize_table_names was here railties/test/generators/named_base_test.rb:9: warning: method redefined; discarding old pluralize_table_names= activesupport/lib/active_support/core_ext/class/attribute.rb:83: warning: previous definition of pluralize_table_names= was here
* | | | | Merge pull request #18840 from yuki24/remove-warning-from-plugin-generatorYves Senn2015-02-091-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | Remove warning from Plugin Generator
| * | | | Remove warning from Plugin GeneratorYuki Nishijima2015-02-081-3/+3
| | |/ / | |/| | | | | | | | | | | | | | | | | | This removes the following warning: rails/railties/lib/rails/generators/rails/plugin/plugin_generator.rb:321: warning: shadowing outer local variable - content
* | | | Merge pull request #18764 from tsun1215/masterAndrew White2015-02-083-0/+33
|\ \ \ \ | |/ / / |/| | | Explicitly ignored wildcard verbs from head_routes
| * | | Explicitly ignored wildcard verbs from head_routesTerence Sun2015-02-083-0/+33
|/ / / | | | | | | | | | | | | | | | In match_head_routes, deleted the routes in which request.request_method was empty (matches all HTTP verbs) when responding to a HEAD request. This prevents catch-all routes (such as Racks) from intercepting the HEAD request. Fixes #18698
* | | Move #18833 changelog to the top [ci skip]Carlos Antonio da Silva2015-02-081-35/+33
| | |
* | | Remove debug codeCarlos Antonio da Silva2015-02-081-5/+0
| | | | | | | | | | | | Added by 101c19f55f5f1d86d35574b805278f11e9a1a48e.
* | | Merge pull request #18850 from ↵Andrew White2015-02-085-19/+50
|\ \ \ | | | | | | | | | | | | | | | | kamipo/fix_rounding_problem_for_postgresql_timestamp_column Fix rounding problem for PostgreSQL timestamp column
| * | | Fix rounding problem for PostgreSQL timestamp columnRyuta Kamizono2015-02-085-19/+50
|/ / / | | | | | | | | | | | | If timestamp column have the precision, it need to format according to the precision of timestamp column.
* | | Merge pull request #18602 from kamipo/respect_database_charset_and_collationAndrew White2015-02-083-5/+21
|\ \ \ | | | | | | | | Respect the database default charset for `schema_migrations` table.
| * | | Respect the database default charset for `schema_migrations` table.Ryuta Kamizono2015-02-083-5/+21
| |/ / | | | | | | | | | | | | | | | The charset of `version` column in `schema_migrations` table is depend on the database default charset and collation rather than the encoding of the connection.
* | | Merge pull request #18848 from kamipo/add_auto_increment_methodAndrew White2015-02-082-3/+7
|\ \ \ | | | | | | | | Add `auto_increment?` instead of `extra == 'auto_increment'`
| * | | Add `auto_increment?` instead of `extra == 'auto_increment'`Ryuta Kamizono2015-02-082-3/+7
| |/ /
* | | Merge pull request #18851 from kamipo/remove_unused_lineAndrew White2015-02-081-1/+0
|\ \ \ | | | | | | | | Remove unused line
| * | | Remove unused lineRyuta Kamizono2015-02-081-1/+0
| |/ /
* | | Merge pull request #18852 from kamipo/missing_atAbdelkader Boudih2015-02-081-1/+1
|\ \ \ | |/ / |/| | Missing `@` [ci skip]
| * | Missing `@` [ci skip]Ryuta Kamizono2015-02-081-1/+1
|/ /
* | rm `Type#number?`Sean Griffin2015-02-0717-29/+1
| | | | | | | | | | This predicate is only used in `query_attribute`, and is relatively easy to remove without adding a bunch of is a checks.
* | rm `Type#text?`Sean Griffin2015-02-076-14/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This predicate was only to figure out if it's safe to do case insensitive comparison, which is only a problem on PG. Turns out, PG can just tell us whether we are able to do it or not. If the query turns out to be a problem, let's just replace that method with checking the SQL type for `text` or `character`. I'd rather not burden the type objects with adapter specific knowledge. The *real* solution, is to deprecate this behavior entirely. The only reason we need it is because the `:case_sensitive` option for `validates_uniqueness_of` is documented as "this option is ignored for non-strings". It makes no sense for us to do that. If the type can't be compared in a case insensitive way, the user shouldn't tell us to do case insensitive comparison.
* | Move non-type objects into the `Type::Helpers` namespaceSean Griffin2015-02-0719-104/+110
| | | | | | | | | | | | | | The type code is actually quite accessible, and I'm planning to encourage people to look at the files in the `type` folder to learn more about how it works. This will help reduce the noise from code that is less about type casting, and more about random AR nonsense.
* | rm `ActiveRecord::Type::Decorator`Sean Griffin2015-02-074-28/+0
| | | | | | | | | | | | | | It only existed to make sure the subclasses of `Delegator` were YAML serializable. As of Ruby 2.2, these are YAML dumpable by default, as it includes https://github.com/tenderlove/psych/commit/2a4d9568f7d5d19c00231cf48eb855cc45ec3394
* | Push multi-parameter assignement into the typesSean Griffin2015-02-0712-108/+77
| | | | | | | | | | | | | | | | | | | | | | | | This allows us to remove `Type::Value#klass`, as it was only used for multi-parameter assignment to reach into the types internals. The relevant type objects now accept a hash in addition to their previous accepted arguments to `type_cast_from_user`. This required minor modifications to the tests, since previously they were relying on the fact that mulit-parameter assignement was reaching into the internals of time zone aware attributes. In reaility, changing those properties at runtime wouldn't change the accessor methods for all other forms of assignment.
* | Merge pull request #18842 from yuki24/simplify-NameError#missing_nameRafael Mendonça França2015-02-071-2/+1
|\ \ | | | | | | NameError#missing_name? can just use NameError#name if the arg is a Symbol
| * | NameError#missing_name? can jsut use NameError#name if the arg is a SymbolYuki Nishijima2015-02-071-2/+1
| | | | | | | | | | | | | | | | | | NameError#name returns a missing name as a symbol, so if the given name is a symbol, it doesn't have to use #missing_name to get the last constant name in the error message.
* | | Merge pull request #18574 from aditya-kapoor/silent-actionmailer-testsRafael Mendonça França2015-02-071-5/+16
|\ \ \ | | | | | | | | remove noise from AM tests
| * | | remove noise from AM testsAditya Kapoor2015-02-071-5/+16
| |/ /
* | | Merge pull request #18835 from jtmkrueger/masterXavier Noria2015-02-071-0/+0
|\ \ \ | |/ / |/| | Use the Rails favicon.ico instead of the ruby favicon.ico for rails guides [ci skip]