Commit Graph

28518 Commits

Author SHA1 Message Date
Rafael Mendonça França
5919a552e4 Merge pull request #10303 from ahorner/3-2-stable
Preserve context for joins while merging relations
2013-05-11 20:48:21 -07:00
Andrew Horner
c09829e03d Preserve context for joins while merging relations
This is a backport of #10164, already merged into
master. The issue is described in lengthy detail
in issues #3002 and #5494.
2013-05-11 22:41:47 -05:00
Rafael Mendonça França
5c6cf4e59e Merge pull request #10571 from dasch/dasch/restore-explain-fix
Don't try to EXPLAIN select_db calls
2013-05-11 16:01:44 -07:00
Daniel Schierbeck
ddaa5d5181 Don't try to EXPLAIN select_db calls
Now with a non-broken test.
2013-05-12 00:33:01 +02:00
Rafael Mendonça França
e2804c62df Add CHANGELOG entry removed by mistake [ci skip] 2013-05-11 18:49:36 -03:00
Xavier Noria
0549ebea22 Revert "Don't try to EXPLAIN select_db calls"
Reason: This was backported, but the test does not pass as is.

This reverts commit a33d320cf4.
2013-05-11 01:28:06 +02:00
Rafael Mendonça França
0be27b709b So not make Fixnum#/ private on Ruby verions less than 1.9.3
In those version to_date call Fixnum#/, what will cause a failure
2013-05-10 14:10:10 -03:00
Rafael Mendonça França
a59d661a82 Fix test to ruby 2.0
The default enconding changed on Ruby 2.0
2013-05-10 13:36:42 -03:00
Andrew White
a71119335e Merge pull request #10557 from arunagw/pluck-refactor-using-map
Using map. No need to run query again
2013-05-10 08:37:03 -07:00
Arun Agrawal
afedb090f0 Using map. No need to run query again 2013-05-10 17:33:47 +02:00
Xavier Noria
4fa860728f Merge pull request #10555 from dasch/dasch/3-2-stable
Don't try to EXPLAIN select_db calls
2013-05-10 08:05:54 -07:00
Daniel Schierbeck
a33d320cf4 Don't try to EXPLAIN select_db calls 2013-05-10 16:50:35 +02:00
Rafael Mendonça França
3589181122 Merge pull request #10552 from arunagw/pluck-fixed-3-2-stable
Pluck fixed 3 2 stable
2013-05-10 07:06:50 -07:00
Arun Agrawal
de5b89ddc9 Fixed pluck to be working with selects.
See #9777 for details.

Previously pluck is not returning what we wanted to
Added a test also to make sure it's working fine.
 
This will also fix the build for 1.8.7 as we 
were doing some sort on hash.

Thanks @pixeltrix for helping me out.

Thanks @linduxed for pairing with me.
2013-05-10 16:05:05 +02:00
Arun Agrawal
6ab3c73062 Remove useless else 2013-05-10 15:17:24 +02:00
Rafael Mendonça França
84c69a1653 Revert "Merge pull request #8209 from senny/backport_8176"
This reverts commit 7240202784, reversing
changes made to e4e2bcce75.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/relation/calculations.rb
	activerecord/test/cases/calculations_test.rb

Reason: This caused a regression since it changed the behavior in a
stable release.

Fixes #9777
2013-05-08 23:34:24 -03:00
Rafael Mendonça França
c910388587 Revert "Remove unicode character encoding from ActiveSupport::JSON.encode"
This reverts commit 815a9431ab.

Conflicts:
	activesupport/test/json/encoding_test.rb

Reason: This was causing a regression where the resulting string is always
returning UTF-8. Also it changes the behavior of this method on a stable release.

Fixes #9498.
2013-05-08 21:03:37 -03:00
Carlos Antonio da Silva
8218a46adb Merge pull request #10496 from arunagw/build-fix-scaffold-generator
Build fix for scaffold generator
2013-05-07 05:13:49 -07:00
Arun Agrawal
8407ab10f0 Build fix for scaffold generator
3-2 behaves different when scaffolding.
2013-05-07 12:53:23 +02:00
Rafael Mendonça França
f8c4a31e0b Merge pull request #10489 from greenriver/ar_counter_cache_multiple_destroy
Confirm a record has not already been destroyed before decrementing counter cache

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/associations/builder/belongs_to.rb
2013-05-06 22:44:01 -03:00
Rafael Mendonça França
0b35a3aacc Merge pull request #10478 from cainlevy/patch-1
use canonical #controller_path logic in controller test cases
Conflicts:
	actionpack/lib/action_controller/test_case.rb
2013-05-06 22:19:46 -03:00
Rafael Mendonça França
fb90ce015f Merge pull request #10406 from greenriver/distance_of_time_rational
Correct time_ago_in_words to handle situation where Fixnum#/ returns a Rational (thanks to mathn)
2013-05-06 07:27:59 -07:00
Ben Tucker
5a6d9d5491 Merging in fix from #8222 2013-05-06 09:36:40 -04:00
Carlos Antonio da Silva
3c01a693d9 Merge pull request #10466 from prathamesh-sonpatki/scaffold-assets
Fix tests related to scaffolding generator with --assets=false switch
2013-05-05 11:31:15 -03:00
Rafael Mendonça França
927a04da40 Merge pull request #10448 from arunagw/bug-fix-scaffold-generator-master
Fixes Scaffold generator with --assets=false
Conflicts:
	railties/CHANGELOG.md

Conflicts:
	railties/CHANGELOG.md
	railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
2013-05-04 10:58:53 -03:00
Janko Marohnić
5519468523 Fix ActiveRecord::Store not tracking changes 2013-04-29 20:39:52 +02:00
Aaron Patterson
9d7a748a51 adding test for the symbol refs 2013-04-26 16:47:27 -07:00
Aaron Patterson
ba12ef6ae1 just clear the caches on clear! rather than replacing. fixes #10251 2013-04-17 11:36:08 -07:00
Aaron Patterson
03d071d3cf adding a test for root path in the app 2013-04-17 11:30:17 -07:00
Carlos Antonio da Silva
dddc093a1a Merge pull request #10246 from prathamesh-sonpatki/3.2.13-https-rubygems
Using secure source https://rubygems.org when generating new plugin with Rails 3.2
2013-04-17 05:23:03 -07:00
Prathamesh Sonpatki
cd548d9283 Use secure source in generated Gemfile for creating new plugin. Closes #10245 2013-04-17 17:40:52 +05:30
Carlos Antonio da Silva
624428b278 Fix "Scaling Rails Screencasts" link in caching guide
Closes #10241 [ci skip]
2013-04-16 20:25:34 -03:00
Carlos Antonio da Silva
130f96c432 Merge pull request #9688 from alexeymuranov/doc-nested-attributes-3-2
3-2-stable documentation: the possibility to use a hash of hashes for nested attributes
2013-04-13 15:11:26 -07:00
Alexey Muranov
efd86315a7 Document nested attributes as hash of hashes
Document the possibility to use a hash of hashes for nested attributes for a one-to-many association (in addition to the documented possibility to use an array of hashes).

Align indentation in comments.
2013-04-13 13:56:09 +02:00
Rafael Mendonça França
68239487bf Merge pull request #10172 from senny/10098_backport
Backport: Correctly parse bigint defaults in PostgreSQL
2013-04-11 06:41:49 -07:00
Erik Peterson
a6d9e16e41 Correctly parse bigint defaults in PostgreSQL, Backpost #10098.
Conflicts:

	activerecord/CHANGELOG.md
	activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
	activerecord/test/cases/schema_dumper_test.rb
2013-04-11 10:11:18 +02:00
Aaron Patterson
536f316cd3 Merge branch '3-2-later' into 3-2-stable
* 3-2-later:
  adding test for CVE
2013-04-09 09:22:42 -07:00
Rafael Mendonça França
c9bd2022d4 Improve the changelog entry [ci skip] 2013-04-05 16:54:01 -03:00
Rafael Mendonça França
dbe25910fa Merge pull request #10105 from rmm5t/fix-explicit-name-on-multiple-fields
Fix explicit names on multiple file fields
2013-04-05 12:53:26 -07:00
Ryan McGeary
44a9aedd7b Fix explicit names on multiple file fields
If a file field tag is passed the multiple option, it is turned into an
array field (appending "[]"), but if the file field is passed an
explicit name as an option, leave the name alone (do not append "[]").

Fixes #9830
2013-04-05 15:35:20 -04:00
Carlos Antonio da Silva
fe58853765 Fix typo in view name
Introduced in 2c22376fe0
2013-04-03 20:59:44 -03:00
Carlos Antonio da Silva
e252e0ffe1 Use 1.8 hash style in test views
Introduced in 2c22376fe0
2013-04-03 20:59:40 -03:00
Carlos Antonio da Silva
e59f3809ef Merge pull request #7792 from seejee/chained_scopes_preload_properly
Fixes Issue #7490: Chained scopes will preload properly
2013-04-03 15:43:59 -07:00
Chris Geihsler
453c7d6c47 Chained scopes will be preloaded properly. Fixes #7490 2013-04-03 18:41:12 -04:00
Dmitry Vorotilin
2c22376fe0 Common behavior with adding formats to lookup_context for TemplateRenderer and PartialRenderer 2013-04-02 10:36:23 -07:00
Carlos Antonio da Silva
060fca7897 Fix formatting and minor review in AP changelog
Sentences starting with # are considered headings.
2013-03-30 16:42:52 -03:00
Steve Klabnik
bac6928eef Add attr_accessible to the Getting Started Guide.
This was brought up in #9995, but is only present in 3-2-stable, since
mass assignment is removed from Rails 4.
2013-03-29 16:28:04 -07:00
Rafael Mendonça França
e06b4fab8e Removing explain support warning from the Railtie
This is causing a regression since the Active Record Railtie is trying to
connect to the development database in the application boot.

See https://github.com/rails/rails/pull/6197#issuecomment-15199273
2013-03-28 13:21:56 -03:00
Carlos Antonio da Silva
75d0a81ffe Merge pull request #9943 from fredwu/test_fix_for_74e59ea
Fixed test failures on 1.8.7 caused by 74e59ea
2013-03-26 19:43:14 -07:00
Fred Wu
dee5915aac Fixed test failures on 1.8.7 caused by 74e59ea 2013-03-27 11:29:37 +11:00