Commit Graph

43183 Commits

Author SHA1 Message Date
Rafael Mendonça França 5b043f95c3 Merge pull request #17978 from kommen/fixed-pr-14903
Ensure append_info_to_payload is called even if an exception is raised.

Conflicts:
	actionpack/CHANGELOG.md

Conflicts:
	actionpack/CHANGELOG.md
2015-01-02 14:18:24 -03:00
Rafael Mendonça França 3812db5e19 Merge pull request #15746 from amccloud/auto-inverse_of-in-module
Fixed automatic inverse_of for models nested in module

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
2015-01-02 11:07:35 -03:00
Rafael Mendonça França 11cde74629 Merge pull request #18295 from jaroslawr/4-1-stable-backport-flatten-callbacks-call-stacks
Flatten the call stacks ActiveSupport::Callbacks produces, fix #18011.
2015-01-02 10:14:33 -03:00
Jaroslaw Rzeszotko e6c53dbe54 Flatten the call stacks ActiveSupport::Callbacks produces, fix #18011.
Conflicts:
	activesupport/lib/active_support/callbacks.rb
2015-01-02 12:24:16 +01:00
Rafael Mendonça França f375003680 Merge pull request #18080 from korbin/fix_reaping_frequency_configuration
Fix issue with reaping_frequency type.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
2015-01-02 01:38:23 -03:00
Rafael Mendonça França 81d9a51a8e Fix scaffold generator with --helper=false option
Conflicts:
	railties/CHANGELOG.md
2015-01-01 23:19:05 -03:00
Rafael Mendonça França 02edbcdf22 Check by @v before converting the entry on expired?
We should convert when @v is defined not @value.

The test was calling value first that already converts the entry so we
are not catching this bug.
2015-01-01 22:27:39 -03:00
Rafael Mendonça França 116695b258 Preparing for 4.1.9.rc1 release 2015-01-01 22:09:46 -03:00
Rafael Mendonça França 2c1bae6513 Fix some warnings with Ruby 2.2
warning: possible reference to past scope

Conflicts:
	activerecord/test/cases/relation/mutation_test.rb
2014-12-30 17:18:57 -03:00
Rafael Mendonça França 499dea4644 Fix typo 💣 [ci skip] 2014-12-29 20:57:53 -03:00
Rafael Mendonça França 718243a14a Merge pull request #11085 from acapilleri/partial_exception_message
fix identifier error message of partial with unvalid charter

Conflicts:
	actionview/CHANGELOG.md

Conflicts:
	actionview/CHANGELOG.md
2014-12-29 20:51:17 -03:00
Matthew Draper 90ad8782c4 As of Unicode 6.3, Mongolian Vowel Separator is not whitespace
Ruby 2.2 knows this, and no longer matches it with [[:space:]], so it's
not a good candidate for testing String#squish.
2014-12-29 16:40:15 -03:00
Rafael Mendonça França f8eead1844 Remove some warning with Ruby 2.2 2014-12-29 16:08:38 -03:00
Rafael Mendonça França 4399a23add i18n.enforce_available_locales overrides the I18n configuration
This will make Rails work with i18n 0.6 and 0.7.
2014-12-29 16:02:17 -03:00
Rafael Mendonça França 4adb963e87 Merge pull request #18236 from vipulnsward/dont-eval-frozen
Fix html_safe string access modifying frozen values

Conflicts:
	activesupport/lib/active_support/core_ext/string/output_safety.rb
2014-12-29 14:12:41 -03:00
Rafael Mendonça França 854d64579c Test with Ruby 2.2 2014-12-29 13:11:50 -03:00
Yves Senn a4016ca7df Merge pull request #18232 from yousuketto/doc-for-bundler-require
adjust args of Bundler.require in guides [ci skip]
2014-12-29 09:04:31 +01:00
Sean Griffin 2d9d4c9d28 Avoid using transactional fixtures in a test which creates tables
MySQL will blow up
2014-12-23 10:46:53 -07:00
Sean Griffin e6a91784c5 Add explicit test case for #18168 2014-12-23 10:25:36 -07:00
eileencodes 6ecf6bb76d Always add lambda to scope chain to eliminate branch in eval_scope
We convert all other scopes to lambda's so it makes sense that we should
always returns a lambda on a ThroughReflection as well. This eliminates
the need to check if the scope is a Relation.
2014-12-23 10:14:49 -07:00
Sean Griffin b0199b849a Merge pull request #18170 from tgxworld/add_docs_for_rails_application_secrets
[ci skip]
2014-12-23 09:46:59 -07:00
Yves Senn dd2792774d Merge pull request #18132 from rochefort/fix-typo-nodoc
Fix typo in nodoc [ci skip]
2014-12-22 09:26:37 +01:00
Yves Senn db6250874f `db:structure:load` and `db:schema:load` no longer purge the database.
Closes #17945

`db:test:prepare` still purges the database to always keep the test
database in a consistent state.

This patch introduces new problems with `db:schema:load`. Prior
to the introduction of foreign-keys, we could run this file against
a non-empty database. Since every `create_table` containted the
`force: true` option, this would recreate tables when loading the schema.

However with foreign-keys in place, `force: true` wont work anymore and
the task will crash.

/cc @schneems

Conflicts:
	activerecord/CHANGELOG.md
2014-12-19 12:30:13 +01:00
Rafael Mendonça França 281c5ea78e Enable Travis CI container-mode
And also bundler cache

Conflicts:
	.travis.yml
2014-12-18 18:31:06 -02:00
Rafael Mendonça França 01b15a79f6 Merge pull request #18052 from timoschilling/reset_variants
allow reseting of request variants
2014-12-17 19:40:27 -02:00
Tatiana Soukiassian 5d20b2c28b Fix handling of positional url helper arguments when format is false
There is no need to subtract one from the path_params size when there is
no format parameter because it is not present in the path_params array.

Fixes #17819.

(cherry picked from commit 1a50be8231)

Conflicts:
	actionpack/CHANGELOG.md
	actionpack/lib/action_dispatch/routing/route_set.rb
2014-12-14 04:35:41 +00:00
Santiago Pastorino 5d8548db2e Merge pull request #18021 from nateberkopec/fix-filter-param-symbol-dup
ParameterFilter shouldn't try to dup symbol keys
2014-12-13 19:00:18 -02:00
Matthew Draper c8e2c4fe00 Merge pull request #17186 from tgxworld/header_authentication_token
Allow authentication header to not have to specify 'token=' key.

Conflicts:
	actionpack/CHANGELOG.md
2014-12-13 09:32:38 +10:30
Rafael Mendonça França 9bc0afffea Merge pull request #16011 from xjlu/token_and_options
Improve token_and_options regex and test
2014-12-13 09:31:23 +10:30
Yves Senn ee484ec04c Merge pull request #17739 from rails/bring_back_db_test_prepare
bring back `db:test:prepare`.
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/migration.rb

This also includes the initializer-order-fix for Active Record
configurations. This patch breaks oracle-enahnced-adapter.

/cc @rafaelfranca @yahonda
2014-12-10 09:43:27 +01:00
Yves Senn ac6c31fdf0 tests, run `test_test.rb` with `RAILS_ENV=test`.
The tests to verify our testing setup used `RAILS_ENV=development`
to execute the tests. Let's keep it as close to a real-world setup
as possible.
2014-12-10 09:38:36 +01:00
Sean Griffin 1b70e64cbd Allow custom handling of non-standard types in `time_zone_conversion`
PostgreSQL for example, allows infinity as a valid value for date time
columns. The PG type has explicit handling for that case. However, time
zone conversion will end up trampling that handling. Unfortunately, we
can't call super and then convert time zones.

However, if we get back nil from `.in_time_zone`, it's something we
didn't expect so we can let the superclass handle it.

Backport of 42418cfc94 and
65588b7463
Fixes #17971
2014-12-08 15:13:19 -07:00
Rafael Mendonça França aa617ef7fd Merge pull request #17964 from carols10cents/improve-after-commit-argumenterror-message
Make error message clearer that :on requires a symbol, not a string
2014-12-08 15:20:02 -02:00
Rob Looby 6dad71581a ignore reverse_order when finding in batches 2014-12-05 16:03:14 -06:00
Caleb Thompson 5d6bb89f80 Remove environment dependency for db:schema:load
All of the behavior :environment was giving (that db:schema:load needed)
was provided as well with :load_config.

This will address an issue introduced in
https://github.com/rails/rails/pull/15394. The fact that db:schema:load
now drops and creates the database causes the Octopus gem to have [an
issue](https://github.com/tchandy/octopus/issues/273) during the drop
step for the test database (which wasn't happening in db:schema:load
before). The error looks like:

    ActiveRecord::StatementInvalid: PG::ObjectInUse: ERROR:  cannot drop the currently open database
    : DROP DATABASE IF EXISTS "app_test"

Because of the timing, this issue is present in master, 4-2-*, and
4.1.8.

A note to forlorn developers who might see this: "Additionally" in a
commit message means you should have a separate commit, with a separate
justification for changes. Small commits with big messages are your
friends.
2014-12-04 14:18:37 -07:00
Rafael Mendonça França fc38626803 Merge pull request #17860 from SamSaffron/fix_engine_backtrace
FIX: absolute_path may be nil for code added via instance_eval
2014-12-04 18:52:26 -02:00
Yves Senn 109b13f7de docs, bring back `ActiveRecord::Core` methods in the API. [ci skip]
This `# :nodoc:` had the effect of hiding every method that follows.
This meant that the API page for `ActiveRecord::Core` only contained
`configurations` and none of the following methods.

Furthermore this `# :nodoc:` had no effect on `maintain_test_schema`.
Those `mattr_accessor` inside the `included` block are not picked up
by rdoc.

/cc @zzak
2014-12-04 09:08:38 +01:00
Rafael Mendonça França 40545aab1a Merge pull request #17867 from tgxworld/silence_minitest_plugins
Silence Minitest for plugin tests.
2014-12-02 11:49:53 -02:00
Santiago Pastorino 21bf395975 Merge pull request #17866 from bogdan/default-form-builder
Bugfix config.action_view.default_form_builder option
2014-12-01 18:03:12 -02:00
Santiago Pastorino 62de9cf8c1 Merge pull request #17811 from mrnugget/fixes_nested_association_preloading
Adds preloaded_records method to NullPreloader - fixes #16070
2014-11-28 11:35:25 -02:00
Abdelkader Boudih ceb776fc4a Merge pull request #17803 from sadfuzzy/patch-2
Update cookies.rb
2014-11-27 18:21:43 +00:00
Denis Savitskiy 29ec4f54c9 Update cookies.rb
:domain option can hold also Array of domains. It was not mentioned anywhere in docs.
2014-11-27 21:17:45 +03:00
Rafael Mendonça França 2f6e68eeed Merge pull request #17782 from cheba/engine-root-master
Use absolute_path of caller_locations to infer engine root
2014-11-26 11:49:51 -02:00
Rafael Mendonça França 07541863a0 Merge pull request #17779 from dilpreet92/server_location
Getting the location of the server
2014-11-26 05:44:23 -02:00
Sean Griffin a953394a9d Don't rely on `Time.current` in tests
Millisecond inequality causes failures on Travis
2014-11-26 05:23:58 -02:00
Rafael Mendonça França 3f18e460d3 No need to depend on sprocket-rails and sass-rails github repository 2014-11-26 05:16:34 -02:00
Santiago Pastorino 1415d1ee24 Merge pull request #17702 from tgxworld/fix_select_tag_include_blank_false
Fix select_tag generating tag when set to false.
2014-11-26 05:01:29 -02:00
Rafael Mendonça França 6392094f95 Remove more warnings 2014-11-24 18:33:46 -02:00
Rafael Mendonça França d91420fb64 Remove some warnings 2014-11-24 18:22:17 -02:00
Sean Griffin 8fe1aec1f0 Add array support when time zone aware attributes are enabled
Conflicts:
	activerecord/test/cases/adapters/postgresql/array_test.rb
2014-11-24 18:22:13 -02:00