Commit Graph

48868 Commits

Author SHA1 Message Date
Rafael Mendonça França
900758145d Remove some warnings 2015-01-03 17:17:47 -03:00
Rafael Mendonça França
c2094f55e3 Merge pull request #18314 from robin850/rm-tmp-sessions
Remove the tmp/sessions folder and its clear task
2015-01-03 15:51:21 -03:00
Robin Dupret
1fd44213aa Remove the tmp/sessions folder and its clear task
Commit 1aea470 introduced this directory but this was at a time when the
default way to store sessions was on the file system under the tmp
directory.

Let's remove references to it from the documentation as well.

[Robin Dupret & yui-knk]
2015-01-03 19:42:07 +01:00
Robin Dupret
9b9ec0ded4 Fix a few typos [ci skip] 2015-01-03 16:36:33 +01:00
Vijay Dev
4b9dba99d6 Merge branch 'master' of github.com:rails/docrails 2015-01-03 14:58:17 +00:00
Xavier Noria
02e72a49d1 Merge pull request #18310 from robin850/guides-improvements
Some guides improvements
2015-01-03 13:53:17 +01:00
Robin Dupret
d0703280c7 Avoid displaying new lines inside note paragraphs
Commit 65a2977 added a `pre-wrap` style for white spaces on `.note`
paragraphs. However, this is first inconsistent as other notes like
warnings don't have this style applied. Furthermore, it seems to be
unneeded for mobile devices.

Also revert changes made in #18147 since they aren't needed anymore.

Cross-refs #18138.

[ci skip]
2015-01-03 12:58:19 +01:00
Robin Dupret
0aa18c7d18 Consider html+erb as a valid language for snippets
To highlight ERB snippets, both `erb` and `html+erb` are used as a
language passed to the code block. However, only the former will be
correctly highlighted.
2015-01-03 12:57:29 +01:00
Robin Dupret
ece28185a8 Update Redcarpet to version 3.2.2 2015-01-03 12:57:22 +01:00
Rafael Mendonça França
a699f5d3e1 Merge pull request #18309 from PaBLoX-CL/fix-fixtures-references
Generated fixtures won't use parent_id when generated with
parent:references
2015-01-02 23:02:53 -03:00
Pablo Olmos de Aguilera Corradini
9405ecdd98 Generated fixtures won't use parent_id when generated with parent:references
Fix #18301
2015-01-02 23:01:24 -03:00
Rafael Mendonça França
3456d543eb Merge pull request #10380 from JonRowe/test_all_domain_2_letter_tld
Assert that 2 letter tlds with 3 letter domain names work when option specified.
2015-01-02 21:27:38 -03:00
Rafael Mendonça França
540a818526 Merge pull request #18307 from brainopia/datetime_regression
Fully support datetime values in AR::Type::DateTime#type_cast_for_database
2015-01-02 20:59:19 -03:00
Rafael Mendonça França
41740be7c4 Merge pull request #18308 from jcoyne/i18n_translate_safety
Unsafe default translations should not be marked html_safe
2015-01-02 20:55:34 -03:00
Justin Coyne
fab50c130b Unsafe default translations should not be marked html_safe
Previously default translation keys that didn't end in `_html`, but came
after a missing key that ended in `_html` were being returned as
html_safe. Now they are not. Fixes #18257
2015-01-02 17:07:01 -06:00
brainopia
e8d6ba218a Support datetime values in AR::Type::DateTime#type_cast_for_database 2015-01-03 02:03:47 +03:00
Rafael Mendonça França
2ade177b37 Merge pull request #18279 from eileencodes/refactor-association-scope
Refactoring of add_constraints in AssociationScope
2015-01-02 19:57:26 -03:00
Rafael Mendonça França
eed68fddee Merge pull request #9065 from atombender/master
Fix TaggedLogging to allow loggers to be instantiated multiple times without having to share the stack of tags
2015-01-02 19:55:29 -03:00
Rafael Mendonça França
734d97d292 Deprecate MissingSourceFile in favor of LoadError.
`MissingSourceFile` was just an alias to `LoadError` and was not
being raised inside the framework.
2015-01-02 19:44:39 -03:00
Rafael Mendonça França
48deeab90a Merge pull request #8740 from amatsuda/missing_source_file
replace use of MissingSourceFile with LoadError

Conflicts:
	activesupport/test/core_ext/load_error_test.rb
2015-01-02 19:19:59 -03:00
claudiob
7cc145ec65 Use Active Model, not ActiveModel in plain English
Also prevents the word "Model" from linking to the documentation
of ActiveModel::Model because that's not intended.

[ci skip]
2015-01-02 14:19:21 -08:00
eileencodes
b0d87a725a Cleanup methods, missing spacing and missing nodocs
Add missing nodoc's
Change `assoc_klass` argument name to `association_klass`
Change `prev_reflection` argument name to `previous_reflection`
Change `prev` to `previous_reflection` in `#get_chain`
Switch use of `refl` and `reflection` in `#get_chain` so main parameter
is not abbreviated.
Add missing space in `#add_constraints`
2015-01-02 17:16:15 -05:00
eileencodes
39abe8355a Move #type_caster to alias tracker initialize
This moves the `#type_caster` from the `aliased_table_for` and into the
initialize of the `alias_tracker`.
2015-01-02 17:15:31 -05:00
eileencodes
96e277c03b Add #all_includes method to reflections
`yield` instead of relying on checking if the reflection is equal to the
`chain_head`.
2015-01-02 17:15:31 -05:00
eileencodes
0408e212ca Initialze #alias_tracker with base table name
Instead of initializing an empty connection use the base table name
instead. Split up and refactor `#create` to be 2 methods `#create` and
`#create_with_joins`. Removes the need to update the count by 1 on
initialzing a JoinDependency.
2015-01-02 17:15:31 -05:00
eileencodes
16fafd6588 Move alias_candiate into AbstractReflection
This moves `alias_candidate` out of the `ReflectionProxy` and into the
`AbstractReflection` so it is shared by all reflections. Change
`alias_name` to a method and and remove assignment in `#get_chain`.
2015-01-02 17:15:31 -05:00
eileencodes
cc9b813a82 Pass connection rather than alias_tracker
After the refactorings we're only using the connection and not the alias
tracker anymore. This builds on commit 18019.

Reuse the already available `@connection` to reduce the surface area of
the alias tracker's API. We can then remove the `attr_reader` because
the connection is already available.
2015-01-02 17:15:31 -05:00
eileencodes
f6729309a0 Assign the #alias_name to each reflection
This makes the `#alias_name` more functional.
2015-01-02 17:15:31 -05:00
eileencodes
e9684d6c88 Clean up / refactor new reflection classes
Move `RuntimeReflection` and `PolymorphicReflect` into Reflection. This
allows the methods to inherit from `ThroughReflection` and DRY up the
methods by removing duplicates.
2015-01-02 17:15:31 -05:00
eileencodes
4d27d56c35 Refactor #get_chain iteration to a linked list
The linked list lets us use a loop in `#add_constraints` and completely
remove the need for indexing the iteration becasue we have access to the
next item in the chain.
2015-01-02 17:15:31 -05:00
eileencodes
17f6ca1e8a Refactor #get_chain to remove need for #construct_tables
By concatnating the `ReflectionProxy` with the `chain` we remove
the need for `#construct_tables` because the `chain` is now in the
correct order (order of the chain DOES matter).
2015-01-02 17:15:31 -05:00
eileencodes
5b0b3cce5c Move #alias_name to ReflectionProxy class
Putting the `#alias_name` into ReflectionProxy means we don't have to
cache the `#alias_name` globally anymore - it's not cached per query.
2015-01-02 17:15:30 -05:00
eileencodes
092171da30 Clean up assignments in #add_constraints
`is_first_chain`, `items` and `klass` are no longer beneficial and can
be called directly instead of via their assignments - because they are
each only used once.
2015-01-02 17:15:30 -05:00
eileencodes
076682692c Refactor construct_tables method
Move method structure into reflection classes for accessibly on each
reflection rather than by traversing the chain.
2015-01-02 17:15:30 -05:00
eileencodes
69d05ae3e5 Add RuntimeReflection for recursive access to chain
The `RuntimeReflection` class allows the reflection to be accessed at
runtime - then we always know which reflection we are accessing in the
chain. The `#get_chain` method then allows us to recursively access the
chain through the `RuntimeReflection`.
2015-01-02 17:15:30 -05:00
eileencodes
08acb4bccb Add PolymorphicReflection and constraints method
`#constraints` builds a flattened version of `scope_chain` to
allow it to be accessible without requiring an index when iterating
over the `scope_chain`
2015-01-02 17:15:30 -05:00
Rafael Mendonça França
9b366b95f9 Don't test invalid log encoding against PostgreSQL adapter
It already treats the message
2015-01-02 19:00:33 -03:00
Robin Dupret
4b04fc0528 A quick pass through NestedAttributes' doc [ci skip] 2015-01-02 22:05:52 +01:00
Zachary Scott
de1c1a6f7b Revert part of 996e646bd8cff3bcf2b13863439f48d3e744cdae [ci skip] 2015-01-02 12:19:52 -08:00
Robin Dupret
843fc99786 Follow up to #17973 [ci skip] 2015-01-02 20:26:39 +01:00
Rafael Mendonça França
c2d2a7d4cc Merge pull request #17822 from kamipo/refactor_visit_change_column_definition
Refactor `visit_ChangeColumnDefinition`
2015-01-02 16:21:55 -03:00
Rafael Mendonça França
3793b4063a Merge pull request #8547 from printercu/patch-1
fix for messages in invalid encoding from db-drivers

Conflicts:
	activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
	activerecord/test/cases/connection_adapters/abstract_adapter_test.rb
2015-01-02 16:15:18 -03:00
Ryuta Kamizono
3c10043bc2 Refactor visit_ChangeColumnDefinition
`visit_ChangeColumnDefinition` is the same "CHANGE column_name " + `visit_ColumnDefinition(o)`.
2015-01-03 02:46:07 +09:00
Ryuta Kamizono
84859c45a7 Add default value for create_table_definition
In most cases, `create_table_definition` called by table_name (the first
argument) only.
2015-01-03 02:38:22 +09:00
Rafael Mendonça França
dbe7fe289c Merge pull request #17820 from fw42/restore_query_cache_on_rollback
Clear query cache on rollback
2015-01-02 14:36:23 -03:00
Rafael Mendonça França
ecdae459d2 Merge pull request #15309 from iantropov/issue_12698_build_through
Add setting of FK for throgh associations while building

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/cases/associations/has_many_through_associations_test.rb
2015-01-02 14:29:07 -03:00
Rafael Mendonça França
2d743b528c 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
2015-01-02 14:16:15 -03:00
Rafael Mendonça França
873870df4c Merge pull request #17974 from killthekitten/fix-render-block
Make possible to use blocks with short version of render partial

Conflicts:
	actionview/CHANGELOG.md
2015-01-02 14:12:23 -03:00
Rafael Mendonça França
c455817804 Merge pull request #17973 from maurogeorge/file_field_hidden_field
Generate a hidden_tag when using a file_field
2015-01-02 13:57:33 -03:00
Rafael Mendonça França
8b3cd74b8a Remove thread variables backport
They are already present on Ruby 2.2
2015-01-02 13:50:11 -03:00