Aaron Patterson
f230dbf699
this should be private, no other instances of Root should call it
2013-10-22 11:00:55 -07:00
Aaron Patterson
f05f7ffb2e
do not search through the keys array twice
2013-10-22 10:42:47 -07:00
Aaron Patterson
8b9733d735
use the provided block to filter lists
2013-10-22 10:42:47 -07:00
Aaron Patterson
2dc889401c
stop using send
so that method privacy is respected and we get a small
...
perf increase
2013-10-22 10:42:47 -07:00
Rafael Mendonça França
5ad34a8d8d
Fix order dependent tests
2013-10-22 11:35:33 -02:00
Yves Senn
ebeb87eca8
Merge pull request #12606 from robin850/apps-with-spaces
...
Make the application name snake cased when it contains spaces
2013-10-22 05:22:04 -07:00
Robin Dupret
52b252614e
Make the application name snake cased when it contains spaces
...
The application name is used to fill the `database.yml` and
`session_store.rb` files ; previously, if the provided name contained
whitespaces, it led to unexpected names in these files.
Since Shellwords.escape adds backslashes to escape spaces, the app_name
should remove them and replace any space with an underscore (just like
periods previously).
Also improve the assert_file helper to work with paths containing spaces
using String#shellescape.
2013-10-22 14:13:14 +02:00
Yves Senn
99044beb81
minor Active Record CHANGELOG cleanup. [ci skip].
2013-10-22 09:36:49 +02:00
Aaron Patterson
01da359393
move helper class to the top
2013-10-21 15:41:25 -07:00
Aaron Patterson
db99407694
build the association graph functionally
...
This lets us avoid the constant calls to Array#<<
2013-10-21 15:08:51 -07:00
Aaron Patterson
8f5647e9c5
Merge branch 'master' into joindep
...
* master: (23 commits)
Escape the parentheses in the default function regexp
Update docs on Tilt::Template in Asset Pipeline guide
Fix loading a sql structure file on postgres when the file's path has whitespace in it
remove trailing whitespace added with b057765 [ci skip].
Allow unscope to work with `where.not`
Raise an exception when model without primary key calls .find_with_ids
Process sub-query relation's binding values
Instrument the generation of Action Mailer messages
Remove extra variable creation and merge.
In Relation#empty? use #exists? instead of #count.
[ci skip] avoid deprecation warning in sample code
Convert Fixnum into String the port number in MySQL
Fix some indentation on autosave association
Make define_non_cyclic_method simpler
Add Sass gobbling info to asset pipeline docs
Ensure the state is clean after one failure
Fix typo in form_helper.rb
add a new local variable to track if digests are being stored, to ensure the cleanup works correctly
[ci skip] Fix number of methods added by association.
update digestor code based on review
...
2013-10-21 14:59:14 -07:00
Aaron Patterson
6546cf2632
@base_klass is not used
2013-10-21 14:58:53 -07:00
Aaron Patterson
fadb6d923b
join_type isn't used on the node anymore
2013-10-21 14:56:46 -07:00
Aaron Patterson
aa5affbff3
make joins generation method look similar
2013-10-21 14:53:33 -07:00
Aaron Patterson
00a426ee37
remove node duping code
2013-10-21 14:43:42 -07:00
Aaron Patterson
10b2aa2887
refactor outer join generation
2013-10-21 14:30:50 -07:00
Aaron Patterson
0480b8c717
add outer joins for matching nodes
2013-10-21 14:28:35 -07:00
Aaron Patterson
7894ae39c8
construct joins by walking the outer join tree
2013-10-21 14:24:22 -07:00
Rafael Mendonça França
b98c10c164
Merge pull request #12588 from jetthoughts/12586_subquery_with_unprepared_sql
...
Inline bind values for sub-queries generated for Relation in where
Conflicts:
activerecord/CHANGELOG.md
2013-10-21 19:13:04 -02:00
Rafael Mendonça França
a595fc1c56
Escape the parentheses in the default function regexp
...
This is causing every default value in PostreSQL database to being
handled as default function.
Fixes #12581
2013-10-21 16:20:28 -02:00
Yves Senn
5a254c2058
Merge pull request #12567 from GoBoundless/fix_postgres_structure_import
...
Fix loading a sql structure file on postgres when the file's path has whitespace in it
2013-10-21 10:49:49 -07:00
Guillermo Iguaran
1bf87c1ee2
Merge pull request #12603 from dv/fix-tilt-template-in-asset-pipeline-docs
...
Update docs on Tilt::Template in Asset Pipeline guide
2013-10-21 10:45:58 -07:00
David Verhasselt
eb6defbae9
Update docs on Tilt::Template in Asset Pipeline guide
2013-10-21 20:34:11 +03:00
Kevin Mook
a733e00b10
Fix loading a sql structure file on postgres when the file's path has whitespace in it
2013-10-21 13:30:05 -04:00
Yves Senn
19639c7184
remove trailing whitespace added with b057765 [ci skip].
2013-10-21 17:25:25 +02:00
Yves Senn
9a32c5f645
Merge pull request #12565 from stormsilver/unscope_fixes
...
Allow unscope to work with `where.not`
2013-10-21 08:19:13 -07:00
Eric Hankins
b057765817
Allow unscope to work with where.not
...
Allows you to call #unscope on a relation with negative equality operators,
i.e. Arel::Nodes::NotIn and Arel::Nodes::NotEqual that have been generated
through the use of where.not.
2013-10-21 09:43:57 -05:00
Yves Senn
7364156391
Merge pull request #12549 from makimoto/raise-when-find-without-pk
...
Raise an exception when model without primary key calls .find_with_ids
2013-10-21 01:18:41 -07:00
Shimpei Makimoto
e2419a451a
Raise an exception when model without primary key calls .find_with_ids
2013-10-21 17:07:47 +09:00
Yves Senn
6205476a53
Merge pull request #12591 from vipulnsward/remove_mail_merge
...
Remove extra variable creation and merge.
2013-10-20 23:58:53 -07:00
José Valim
fdfc96750a
Merge pull request #12556 from dasch/dasch/nstrument-am-processing
...
Instrument the generation of Action Mailer messages
2013-10-20 15:46:22 -07:00
Aaron Patterson
796c0fc1b0
pass the outer joins to join_constraints
2013-10-20 13:48:44 -07:00
Aaron Patterson
d059fa6f0c
disconnect join_constraints from the instance
2013-10-20 13:42:42 -07:00
Aaron Patterson
fe67bc2a86
pass in scope chain so reflection is not needed
2013-10-20 13:18:50 -07:00
Aaron Patterson
e7bb4bb072
pass the foreign table and class to the join_constraints method
2013-10-20 13:14:48 -07:00
Aaron Patterson
bae5e02cf3
pass the join type to the join_constraints method
2013-10-20 13:11:38 -07:00
Paul Nikitochkin
a2ed5d2381
Process sub-query relation's binding values
...
Generated sub-query for Relation as array condition for `where` method
did not take in account its bind values, in result generates invalid SQL query.
Fixed by adding sub-query relation's binding values to base relation
Closes : #12586
2013-10-20 21:07:07 +03:00
Daniel Schierbeck
8f0c5e00ff
Instrument the generation of Action Mailer messages
...
The processing of outbound mail is instrumented with the key
`process.action_mailer`. The payload includes the mailer name as well as
the mailer method.
2013-10-20 15:21:15 +02:00
Vipul A M
f72437bf3f
Remove extra variable creation and merge.
2013-10-20 10:31:41 +05:30
Santiago Pastorino
cc8d14827d
Merge pull request #12533 from szimek/use_exists_in_relation_empty
...
In Relation#empty? use #exists? instead of #count.
2013-10-19 13:07:09 -07:00
Szymon Nowak
4ba9c508ec
In Relation#empty? use #exists? instead of #count.
2013-10-19 21:53:45 +02:00
Yves Senn
db82e1d0bb
Merge pull request #12560 from sue445/modify_find_lock_sample_code
...
avoid deprecation warning in sample code [ci skip]
2013-10-18 07:16:15 -07:00
Yves Senn
7ec3f35495
Merge pull request #11839 from chocoby/fix/convert_port_number
...
Convert Fixnum into String the port number like `db:structure:dump` task in MySQL.
2013-10-18 07:15:31 -07:00
sue445
a913af96e0
[ci skip] avoid deprecation warning in sample code
...
Account.find(1, lock: true)
-> DEPRECATION WARNING: Passing options to #find is deprecated. Please build a scope and then call #find on it.
2013-10-18 22:01:50 +09:00
Kenta Okamoto
bc5148da3d
Convert Fixnum into String the port number in MySQL
2013-10-18 21:56:59 +09:00
Rafael Mendonça França
6c2810b8ed
Merge pull request #12569 from arthurnn/autosave_small_cleanip
...
Small cleanup on autosave association
2013-10-17 08:02:53 -07:00
Arthur Neves
fbf5085875
Fix some indentation on autosave association
2013-10-17 09:55:38 -04:00
Arthur Neves
827d42e1d1
Make define_non_cyclic_method simpler
2013-10-17 09:53:43 -04:00
Yves Senn
5824c6d0ed
Merge pull request #12218 from dv/add-sass-globbing-to-asset-pipeline-docs
...
Add sass globbing to asset pipeline docs [ci skip]
2013-10-17 06:53:24 -07:00
David Verhasselt
4990a79347
Add Sass gobbling info to asset pipeline docs
...
[ci skip]
2013-10-17 14:32:26 +03:00