aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | 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]
| * | | | | | | | | use rails favicon.ico instead or ruby favicon.ico for rails guidesJohn Krueger2015-02-061-0/+0
| | | | | | | | | |
* | | | | | | | | | Merge pull request #14252 from mcfiredrill/make-zones-map-privateArthur Neves2015-02-062-9/+9
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make zones_map private
| * | | | | | | | | | make zones_map privateTony Miller2015-02-062-9/+9
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activesupport/lib/active_support/values/time_zone.rb
* | | | | | | | | | Merge pull request #18837 from y-yagi/fix-deprecation-warning-in-render-testArthur Nogueira Neves2015-02-061-2/+2
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | use kwargs instead of xhr method. refs #18771.
| * | | | | | | | | use kwargs instead of xhr method. refs #18771.yuuji.yaginuma2015-02-071-2/+2
|/ / / / / / / / /
* | | | | | | | | Add link to the show action in the getting startedRafael Mendonça França2015-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Closes #16538
* | | | | | | | | Merge pull request #18834 from mfazekas/fix-i18-for-openstructRafael Mendonça França2015-02-062-1/+13
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fixed undefined method `i18n_key' for nil:NilClass for labels in non AR ...
| * | | | | | | | | Fixed undefined method `i18n_key' for nil:NilClass for labels in non AR form_forMiklos Fazekas2015-02-062-1/+13
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring at #18647 broke using non active record objects in form_for. This patch restores the original behaviour where we only compute i18 key when object.respond_to?(:to_model)
* | | | | | | | | Document the usage of the default option to attributeSean Griffin2015-02-061-0/+14
| | | | | | | | |
* | | | | | | | | A symbol can be passed to `attribute`, which should be documentedSean Griffin2015-02-061-3/+4
| | | | | | | | |
* | | | | | | | | Grammar and RDoc formattingSean Griffin2015-02-062-35/+37
| | | | | | | | |
* | | | | | | | | Remove reference to the now done documentation.rakeXavier Noria2015-02-061-1/+0
| | | | | | | | |
* | | | | | | | | README.rdoc -> README.md for newly generated applicationsXavier Noria2015-02-065-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | README.rdoc was generated to support the doc:app task. Now that this task is gone we can switch to Markdown, which is nowadays a better default.
* | | | | | | | | Remove documentation tasksXavier Noria2015-02-069-121/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the tasks doc:app, doc:rails, and doc:guides. In our experience applications do not generate APIs using doc:app. Methods may be certainly documented for maintainers, annotated with YARD tags, etc. but that is intended to be read with the source code, not in a separate website. Then, teams also have typically selected topics written down in Markdown files, or in a GitHub wiki... that kind of thing. If a team absolutely needs to generate application documentation for internal purposes, they can still easily write their own task. Regarding doc:rails and doc:guides, we live in 2015. We are used to go to online docs all the time. If you really want access to the API offline RubyGems generates it for every Rails component unless you tell it not to, and you can checkout the Rails source code to read the guides as Markdown, or download them for a Kindle reader. All in all, maintaining this code does not seem to be worthwhile anymore. As a consequence of this, guides (+3 MB uncompressed) won't be distributed with the rails gem anymore. Of course, guides and API are going to be still part of releases, since documentation is maintained alongside code and tests. Also, time permitting, this will allow us to experiment with novel ways to generate documentation in the Rails docs server, since right now we were constrained by being able to generate them in the user's environment.
* | | | | | | | | Docs pass for the attributes APISean Griffin2015-02-062-39/+154
| | | | | | | | |
* | | | | | | | | Raise ArgumentError when passing nil to Relation#mergeRafael Mendonça França2015-02-063-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nil or false should not be valid argument to the merge method. Closes #12264
* | | | | | | | | Stoping using Relation#merge in default_scopedRafael Mendonça França2015-02-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relation#merge checks if the argument is an array and the only possible returns of build_default_scope is nil or a Relation. Doing this we can raise an ArgumentError when Relation#merge receive a nil value.
* | | | | | | | | Merge pull request #18833 from perceptec/add_only_performed_optionRafael Mendonça França2015-02-064-18/+186
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add an `:only` option to `perform_enqueued_jobs` to filter jobs based on type.
| * | | | | | | | | Add an `:only` option to `perform_enqueued_jobs` to filter jobs based onMichael Ryan2015-02-064-18/+186
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type. This allows specific jobs to be tested, while preventing others from being performed unnecessarily. Example: def test_hello_job assert_performed_jobs 1, only: HelloJob do HelloJob.perform_later('jeremy') LoggingJob.perform_later end end An array may also be specified, to support testing multiple jobs. Example: def test_hello_and_logging_jobs assert_nothing_raised do assert_performed_jobs 2, only: [HelloJob, LoggingJob] do HelloJob.perform_later('jeremy') LoggingJob.perform_later('stewie') RescueJob.perform_later('david') end end end Fixes #18802. Trim space and document :only option.
* | | | | | | | | Significantly improve the performance of `_read_attribute` on JRubySean Griffin2015-02-062-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `&block` form is more than twice as fast as the manual form of delegation (and is the code I'd rather write anyway). Unfortunately, it's still twice as slow on MRI. However, this is enough of a hotspot to justify giving JRuby special treatment. I can't currently provide benchmarks in the context of Active Record, since the JDBC adapters still aren't updated for 4.2, but the actual work performed (assuming it's been read at least once already) will have nearly the same performance characteristics as https://gist.github.com/sgrif/b86832786551aaee74de.
* | | | | | | | | Use keyword argument in the find_in_batches APIRafael Mendonça França2015-02-061-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already validate the keys, so it is better to use the built-in feature to do this