aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Raise an error when AS::JSON.decode is called with optionsGodfrey Chan2013-10-303-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rails 4.1 has switched away from MultiJson, and does not currently support any options on `ActiveSupport::JSON.decode`. Passing in unsupported options (i.e. any non-empty options hash) will now raise an ArgumentError. Rationale: 1. We cannot guarantee the underlying JSON parser won't change in the future, hence we cannot guarantee a consistent set of options the method could take 2. The `json` gem, which happens to be the current JSON parser, takes many dangerous options that is irrelevant to the purpose of AS's JSON decoding API 3. To reserve the options hash for future use, e.g. overriding default global options like ActiveSupport.parse_json_times This change *DOES NOT* introduce any changes in the public API. The signature of the method is still decode(json_text, options). The difference is this method previously accepted undocumented options which does different things when the underlying adapter changes. It now correctly raises an ArgumentError when it encounters options that it does not recognize (and currently it does not support any options).
* Merge pull request #12203 from chancancode/eager_load_jsonJeremy Kemper2013-10-308-227/+242
|\ | | | | Eagerload active_support/json/encoding in active_support/core_ext/object/to_json
| * Moved all JSON core extensions into core_ext/object/jsonGodfrey Chan2013-09-138-227/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TL;DR The primary driver is to remove autoload surprise. This is related to #12106. (The root cause for that ticket is that json/add defines Regexp#to_json among others, but here I'll reproduce the problem without json/add.) Before: >> require 'active_support/core_ext/to_json' => true >> //.as_json NoMethodError: undefined method `as_json' for //:Regexp from (irb):3 from /Users/godfrey/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>' >> //.to_json => "\"(?-mix:)\"" >> //.as_json => "(?-mix:)" After: >> require 'active_support/core_ext/to_json' => true >> //.as_json => "(?-mix:)" This is because ActiveSupport::JSON is autoloaded the first time Object#to_json is called, which causes additional core extentions (previously defined in active_support/json/encoding.rb) to be loaded. When someone require 'active_support/core_ext', the expectation is that it would add certain methods to the core classes NOW. The previous behaviour causes additional methods to be loaded the first time you call `to_json`, which could cause nasty surprises and other unplesant side-effects. This change moves all core extensions in to core_ext/json. AS::JSON is still autoloaded on first #to_json call, but since it nolonger include the core extensions, it should address the aforementioned bug. *Requiring core_ext/object/to_json now causes a deprecation warnning*
* | use a thread local rather than a queue so events are in the right orderAaron Patterson2013-10-301-7/+4
| |
* | no need for a CHANGELOG entry. [ci skip].Yves Senn2013-10-301-7/+1
| |
* | fix code typo in `MysqlAdapter` .Closes #12647.Yves Senn2013-10-303-1/+22
| |
* | Merge pull request #12702 from dmathieu/finetune_session_fetchRafael Mendonça França2013-10-302-2/+8
|\ \ | | | | | | session#fetch doesn't behave exactly like Hash#fetch.
| * | session#fetch doesn't behave exactly like Hash#fetch.Damien Mathieu2013-10-302-2/+8
|/ / | | | | | | | | | | | | | | | | Mention it in the changelog and add a test checking for regressions. Hash#fetch isn't adding the defaultly returned value. However, in the session, saving it is the behavior we should expect. See discussion in #12692
* | Merge pull request #12687 from notalex/masterYves Senn2013-10-301-7/+12
|\ \ | | | | | | Update pull request instructions as per the new Github UI [ci skip]
| * | Update pull request instructions as per the new Github UIAlex Johnson2013-10-301-7/+12
|/ / | | | | | | [ci skip]
* | Merge pull request #12653 from releu/short_arrays_in_inspectYves Senn2013-10-303-3/+19
|\ \ | | | | | | Short arrays in record.inspect
| * | short arrays in inspectJan Bernacki2013-10-303-3/+19
|/ /
* | Merge pull request #12692 from dmathieu/session_fetchGuillermo Iguaran2013-10-293-0/+37
|\ \ | | | | | | Add session#fetch
| * | add the fetch method to sessionsDamien Mathieu2013-10-293-0/+37
| | |
* | | Merge pull request #12693 from carpodaster/convert-cdata-input-to-stringRafael Mendonça França2013-10-292-1/+5
|\ \ \ | |/ / |/| | Convert CDATA input to string before gsub'ing
| * | Convert CDATA input to string before gsub'ingCarsten Zimmermann2013-10-292-1/+5
|/ / | | | | | | | | Rails 3.2 API allowed arbitrary input for cdata_section; this change re-introduces the old behaviour.
* | Merge pull request #12690 from durrantm/minor_README_changeYves Senn2013-10-291-1/+1
|\ \ | | | | | | Clarify that visiting http://localhost:3000 should be done in a browser. [ci skip]
| * | Clarify that visiting http://localhost:3000 should be done in a browser.Michael Durrant2013-10-291-1/+1
|/ /
* | Merge pull request #12688 from simi/patch-1Rafael Mendonça França2013-10-291-1/+1
|\ \ | | | | | | Update testing.rake with more accurate description of test task.
| * | Update testing.rake with more accurate description of test task.Josef Šimánek2013-10-291-1/+1
|/ / | | | | | | | | According to #5ecd12 change. [ci skip]
* | Revert "add active model basics wip to guides/documents.yaml"Xavier Noria2013-10-291-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | Reason: WIP guides are not in the index because they are partial work pushed to the repo. Either there is someone working on them or else the work was interrupted. Guides are added to the index page when they are finished, the author considers the draft to be complete, someone reviews them, and overall they are considered to be good for users to read. This reverts commit eefc03a8069bddfe31751c4bd4fb1804e7f33c2c.
* | Merge pull request #10664 from aderyabin/docpatchYves Senn2013-10-291-1/+1
|\ \ | | | | | | Fix doc in Postgres database creation [ci skip]
| * | Fix doc in Postgres database creationAndrey Deryabin2013-06-251-1/+1
| | |
* | | Fix broken delete_all test, which will now be failing since #delete_all is ↵David Heinemeier Hansson2013-10-281-4/+4
| | | | | | | | | | | | broken
* | | Add failing test for preloading with a polymorphic association and using the ↵David Heinemeier Hansson2013-10-281-1/+10
| | | | | | | | | | | | existential predicate
* | | Remove confusing generated-code commentaryJeremy Kemper2013-10-281-4/+4
| | |
* | | fix template GemfilesAaron Patterson2013-10-283-12/+25
| | |
* | | always call set_default_accessors from create_rootAaron Patterson2013-10-281-0/+1
| | |
* | | Merge pull request #11785 from grosser/grosser/file-unless-existRafael Mendonça França2013-10-283-0/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | support :unless_exist for FileCache Conflicts: activesupport/CHANGELOG.md activesupport/test/caching_test.rb
| * | | support :unless_exist for FileCachegrosser2013-08-303-0/+12
| | | |
* | | | use a queue rather than a list. fixes #12069Aaron Patterson2013-10-281-1/+1
| | | |
* | | | Merge pull request #11564 from zzak/active_model_guideYves Senn2013-10-281-0/+6
|\ \ \ \ | | | | | | | | | | [Guides] Active Model Basics [ci skip]
| * | | | add active model basics wip to guides/documents.yamlZachary Scott2013-07-221-0/+6
| | | | |
* | | | | fix typo in comment [ci skip].Yves Senn2013-10-281-1/+1
| | | | |
* | | | | Fix typoDavid Heinemeier Hansson2013-10-271-1/+1
| | | | |
* | | | | Fix indentation [ci skip]Carlos Antonio da Silva2013-10-271-2/+2
| | | | |
* | | | | Merge pull request #12578 from ↵Rafael Mendonça França2013-10-275-3/+24
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jeradphelps/configurable_schema_migrations_table_name Configurable name for schema_migrations table Conflicts: activerecord/CHANGELOG.md
| * | | | | added schema_migrations_table_name to ActiveRecord::Base in order that the ↵Jerad Phelps2013-10-275-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | name of the schema migrations table can be configured. consolidated test_schema_migrations_table_name tests Added changelog entry edited changelog removed commented lines removed reader ensure the schema migrations table is reset at end of test added entry to configuration guide guides typo and changelog order
* | | | | | Merge pull request #12668 from arunagw/aa-improvmentsRafael Mendonça França2013-10-272-7/+18
|\ \ \ \ \ \ | | | | | | | | | | | | | | Test fixed for app_generator
| * | | | | | Fixed tests for app_generatorArun Agrawal2013-10-272-7/+18
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added test for jbuilder and web-console inclusion. Added README.rdoc for test default files
* | | | | | Remove warning of shadowing outer local variableRafael Mendonça França2013-10-271-2/+2
| | | | | |
* | | | | | Assert the return value in the testRafael Mendonça França2013-10-271-1/+1
| | | | | |
* | | | | | Merge pull request #12664 from jetthoughts/12242_includes_in_through_associationRafael Mendonça França2013-10-274-2/+37
|\ \ \ \ \ \ | | | | | | | | | | | | | | Skip `include_values` from through associations chains for building association scope
| * | | | | | Skip `include_values` from through associations chains for building target scopePaul Nikitochkin2013-10-274-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #12242, #9517, #10240
* | | | | | | Remove dead code after the skip_jbuilder option removalRafael Mendonça França2013-10-271-1/+0
| | | | | | |
* | | | | | | remove the skip_jbuilder option, just rm it from the GemfileAaron Patterson2013-10-271-3/+0
| | | | | | |
* | | | | | | add comments and fix variable name. oops, forgot to add this. orz!Aaron Patterson2013-10-271-2/+2
| | | | | | |
* | | | | | | remove unused methodsAaron Patterson2013-10-271-4/+0
| | | | | | |
* | | | | | | Merge remote-tracking branch 'origin/master'Aaron Patterson2013-10-275-12/+21
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: Removal of javascript related gems when creating an app Conflicts: railties/lib/rails/generators/app_base.rb
| * \ \ \ \ \ \ Merge pull request #12657 from robin850/skip-javascriptGuillermo Iguaran2013-10-275-14/+21
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Removal of javascript related files when creating an app