Rafael Mendonça França
7b50d7f249
We need an explicit return
...
If we don't return early Ruby will memoize the value of the prefix of
the parent class what will make the subsequent searchs to not work as
expected.
If the early return we are avoiding the memoization.
But when using the deprecated path we need to memoize the value, so we
are not using early return for the deprecated path.
2014-05-14 14:28:54 -03:00
Rafael Mendonça França
548cb1cf7b
Following documentation guideline
2014-05-14 13:47:14 -03:00
Rafael Mendonça França
7bcd66e449
Refactoring the code to make consitional return explicit
2014-05-14 13:45:20 -03:00
Rafael Mendonça França
0af0ffde18
Follow the documentation guideline
2014-05-14 13:44:14 -03:00
Rafael Mendonça França
4fb63f7643
Mark _prefix as nodoc
...
These methods are private API.
2014-05-14 13:42:55 -03:00
Rafael Mendonça França
a0630eee4c
._prefix is private API so we should not recommend to override it
2014-05-14 13:41:20 -03:00
Rafael Mendonça França
05edaa660e
Improve CHANGELOG entry
2014-05-14 13:40:54 -03:00
Rafael Mendonça França
51a52cb836
Merge remote-tracking branch 'apotonick/simplify-prefixes'
...
This is the rebased version of #15026
Closes #15026
2014-05-14 13:36:58 -03:00
Matthew Draper
307a519d82
Merge pull request #14833 from jyao6/attribute_inheritance
...
Fixed Attribute Inheritance Issue
2014-05-14 22:33:03 +09:30
Jessica Yao
6de710d664
Fix inheritance of stored_attributes ( fixes #14672 )
...
[Brad Bennett, Jessica Yao, & Lakshmi Parthasarathy]
2014-05-14 22:32:13 +09:30
kares
c0bfc3f412
PostgreSQLAdapter::Utils seems to be only used from a single spot - quite redundant
2014-05-14 13:38:34 +02:00
kares
ad0ec07f00
move PostgreSQL's DatabaseStatements out of the PostgreSQLAdapter name-space
2014-05-14 13:32:03 +02:00
kares
06e7fec55a
PostgreSQL's SchemaStatements seems a could candidate for re-use (with AR-JDBC)
2014-05-14 12:42:36 +02:00
kares
6822dfad31
introduce AR::ConnectionAdapters::PostgreSQL for sharing modules (with AR-JDBC)
...
... 'shared' OID, ArrayParser and Cast helpers, also re-arranged Column's dependencies
2014-05-14 12:04:14 +02:00
Yves Senn
374d19a743
Merge pull request #15102 from azul/patch-1
...
Fix reference to sanitize helper test suite [ci skip]
2014-05-14 11:33:36 +02:00
azul
4fb2be5456
minor: point to the right test suite location
2014-05-14 09:24:31 +02:00
Aaron Patterson
dd16a1029a
Merge pull request #15099 from eileencodes/refactor_delete_records_method
...
Refactor delete_records method
2014-05-13 19:23:59 -07:00
eileencodes
34db2b7caa
remove count var
...
this change was unneccsary as nothing was gained from it
2014-05-13 21:01:28 -04:00
eileencodes
05a90c36c5
rename delete_all_records to delete_or_nullify_all_records
...
Rename delete_all_records because this name better describes
what the method is doing. We can then remove :all from the
hm:t version and pull out the unoptimized call to load_target
in delete_records and pass it directly.
2014-05-13 20:56:34 -04:00
eileencodes
1c851b8cdf
remove need for :all symbol
...
Refactor delete_count method to only handle delete_all or nullify/nil cases
and not destroy and switch to if/else rather than case statement. This
refactoring allows removal of :all symbol usage.
2014-05-13 20:56:33 -04:00
eileencodes
d8ae2764d0
begin refactoring delete_records method
...
Refactor by creating two methods delete_all_records and delete_records
to be called by delete_all and delete (or destroy) respectively.
This reduces the number of conditionals required to handle _how_
records get deleted.
The new delete_count method handles how scope is applied to which
delete action.
A delete_all_records method also has to be called in has_many_through
association because of how the methods are chained. This will be
refactored later on.
2014-05-13 20:56:33 -04:00
Godfrey Chan
522110af70
Merge pull request #15100 from eileencodes/remove-deprecation-warning-no-longer-needed
...
remove deprecation warning
2014-05-13 17:23:58 -07:00
Aaron Patterson
348af15c33
_recall should be set to a hash or not set
...
Then we can avoid nil checks
2014-05-13 17:21:55 -07:00
Aaron Patterson
760aa3b52b
we never call url_for with a block, so rm
2014-05-13 17:05:32 -07:00
eileencodes
b342d2baef
remove deprecation warning
...
This deprecation was released in 4.1.0 and can be removed for 4.2.0,
deprecation message / handling is no longer necessary.
2014-05-13 19:51:57 -04:00
Aaron Patterson
33d6e3be62
drop || test for cases that do not need it
2014-05-13 15:35:41 -07:00
Aaron Patterson
67f815af05
no need to check for presence, script names can be blank
2014-05-13 15:25:22 -07:00
Aaron Patterson
d08810e2a6
extend with a module then use define_method
...
no need for redefine_method
2014-05-13 14:47:04 -07:00
Aaron Patterson
6457ed4126
this method should always have a parameter passed to it, so remove the default
2014-05-13 14:32:45 -07:00
Aaron Patterson
567aa5440e
options should always be passed to url_for
2014-05-13 14:19:31 -07:00
Rafael Mendonça França
5953266474
Merge pull request #15092 from kares/pg-array-parser
...
[postgres] include PgArrayParser directly
2014-05-13 18:07:50 -03:00
Rafael Mendonça França
354fb0b54d
Merge pull request #15095 from JuanitoFatas/doc/generators
...
[ci skip] Fix two factual errors and highlight code in generators guide.
2014-05-13 16:57:19 -03:00
Juanito Fatas
9a1e23a53c
[ci skip] Fix a factual error and highlight code in generators guide.
2014-05-14 03:55:27 +08:00
Rafael Mendonça França
2b84eea9c0
Merge pull request #15072 from mjtko/fix/issue-15064
...
[Fixes #15064 ] Calling number_to_delimited on a ActiveSupport::SafeBuffer results in mangled output
2014-05-13 16:11:40 -03:00
Rafael Mendonça França
0626543f6d
Merge pull request #15073 from ifyouseewendy/master
...
Update and add tests in array_ext_test.rb
2014-05-13 16:11:21 -03:00
Aaron Patterson
89d97560e7
calls with :host should still use the optimized path
2014-05-13 12:07:13 -07:00
Rafael Mendonça França
4cc0767ee5
Merge pull request #15094 from gsamokovarov/patch-1
...
Remove falsy deprecation note in AS guides [ci skip]
2014-05-13 15:34:57 -03:00
Genadi Samokovarov
2efc64c1bc
Remove falsy deprecation note in AS guides [ci skip]
...
This is no longer true as @jeremy removed the deprecation in 7a5601c.
2014-05-13 21:16:10 +03:00
Aaron Patterson
6f3c8fbcd7
use fewer method calls to determine the url_for options
2014-05-13 11:15:23 -07:00
Aaron Patterson
48cce9d399
just merge instead of dup and merge
2014-05-13 11:01:53 -07:00
Aaron Patterson
ca9fd76c2e
the :only_path option is applied by the time the helper is called
2014-05-13 10:51:15 -07:00
Aaron Patterson
566f25beee
options already have symbolized keys, so we can avoid this call
2014-05-13 10:41:39 -07:00
Arthur Neves
b1d52a7409
Use i18n master to run tests
2014-05-13 13:19:53 -04:00
kares
f8d1845fc5
[postgres] include PgArrayParser directly and only load/include ArrayParser if not found
2014-05-13 18:51:34 +02:00
Andrew White
977d36af8f
Merge pull request #15091 from printercu/patch-5
...
Do not check defined?(CGI) on every call #to_query
2014-05-13 17:42:30 +01:00
Carlos Antonio da Silva
c4c5801bd9
Fix assertion order and ✂️ extra spaces
2014-05-13 12:09:11 -03:00
Aaron Patterson
f0f7c4ff96
Merge pull request #15068 from josepjaume/patch-1
...
Dup options hash to prevent modifications
2014-05-13 08:04:24 -07:00
Yves Senn
6470f374c9
pg, clarify default behavior for composite types.
...
* by default composite types are mapped as `OID::Identity` and issue a warning
* the user is advised to register his own `OID::Type` to make use of composite types
Registering a new `OID::Type` does currently not allow to specify the type casting
behavior when writing to the database. In order for it to work we need to use the
values within `@attributes`. They are already being type casted and are ready to be
written to the DB.
See 57643c961f/activerecord/lib/active_record/attribute_methods.rb (L460-L462)
2014-05-13 16:51:04 +02:00
Yves Senn
15285f2248
extract pg type map initialization process to TypeMapInitializer
.
2014-05-13 16:51:04 +02:00
Kassio Borges
8f6e5986ac
Fix how to compute class name on habtm namespaced.
...
Thank's for @laurocaetano for the help with tests. 😃
Fixes #14709
2014-05-13 11:26:46 -03:00