Aman Gupta
daecedf14d
drop tmail
2013-02-28 05:15:08 -08:00
Aman Gupta
76d83c0d5c
use OutputBuffer#safe_append= for <%== to avoid extra string allocations
2013-02-26 01:07:29 -08:00
Aman Gupta
7335865bd9
avoid method call
2013-02-26 01:06:36 -08:00
Aman Gupta
e43316238d
flush whitespace before statements to preserve line numbers
2013-02-25 22:13:11 -08:00
Aman Gupta
c3c6f25ec7
Merge pull request #3 from github/no-escape_once
...
XSS escaping
2013-02-24 21:47:24 -08:00
Aman Gupta
331461a65e
optimize generated erb to reduce method calls
...
before:
');@output_buffer.append= ( content_icon row[:content] );@output_buffer.safe_concat('
');@output_buffer.safe_concat(' ');@output_buffer.append= ( spinner_img );@output_buffer.safe_concat('
');@output_buffer.safe_concat(' </td>
<td class="content">
');@output_buffer.append= ( content_link row[:content] );@output_buffer.safe_concat('
');@output_buffer.safe_concat(' </td>
<td class="message">
');
after:
';@output_buffer.append=( content_icon row[:content] );@output_buffer.safe_append='
';@output_buffer.append=( spinner_img );@output_buffer.safe_append='
</td>
<td class="content">
';@output_buffer.append=( content_link row[:content] );@output_buffer.safe_append='
</td>
<td class="message">
';
2013-02-22 02:56:17 -08:00
Aman Gupta
fd05501b4d
ActionView::OutputBuffer and Erubis handler from rails 3.2
2013-02-21 06:03:01 -08:00
Aman Gupta
0fa76e01de
ActiveSupport::SafeBuffer from upstream rails 3.2
2013-02-21 04:54:58 -08:00
Aman Gupta
1c215bab58
integrate monkey-patches from rails_xss/action_view
2013-02-21 03:20:01 -08:00
Aman Gupta
c7238a0746
faster html escaping code from rails master
2013-02-21 02:44:37 -08:00
Aman Gupta
71123b2913
fix boot on 1.9.3-p385
...
rails-2.3.14.github14/lib/initializer.rb:906:in `replace': can't modify frozen String (RuntimeError)
from gems/rails-2.3.14.github14/lib/initializer.rb:906:in `set_root_path!'
from gems/rails-2.3.14.github14/lib/initializer.rb:860:in `initialize'
from gems/rails-2.3.14.github14/lib/initializer.rb:110:in `new'
from gems/rails-2.3.14.github14/lib/initializer.rb:110:in `run'
from github/config/environment.rb:22:in `<top (required)>'
2013-02-20 02:45:37 -08:00
Xavier Noria
2eede7e5ac
s/escape_once/html_escape/, since html safety is the contract that now says whether something has to be escaped
...
Conflicts:
actionpack/CHANGELOG
actionpack/lib/action_view/helpers/form_tag_helper.rb
actionpack/lib/action_view/helpers/url_helper.rb
actionpack/test/template/url_helper_test.rb
2013-02-16 20:44:20 -08:00
Xavier Noria
507b8182cf
url_for no longer escapes HTML, the :escape option is also gone
...
Rationale: url_for is just a path/URL generator, it is the responsability of the caller to escape conveniently HTML needs it, JavaScript needs different escaping, a text mail needs no escaping at all, etc.
Backported to 2.3. Conflicts:
actionpack/CHANGELOG
actionpack/lib/action_view/helpers/url_helper.rb
actionpack/test/template/url_helper_test.rb
2013-02-16 20:32:13 -08:00
rizwanreza
3df96518be
Allow content_tag options to take an array [ #1741 state:resolved] [rizwanreza, Nick Quaranto]
...
Example:
content_tag('p', "limelight", :class => ["song", "play"])
# => <p class="song play">limelight</p>
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2013-02-16 20:22:41 -08:00
Aman Gupta
84420c7f12
short-circuit String#blank? when string is empty
2013-02-16 17:06:30 -08:00
Aman Gupta
c57e85fd13
Revert "ignore "invalid byte sequence in UTF-8" from String#=~"
...
This reverts commit 18e9b2ffc9 .
2013-02-16 17:05:59 -08:00
Corey Donohoe
2eca011798
Merge pull request #2 from github/cve-2013-0277
...
apply patch for cve-2013-0277
2013-02-11 10:51:52 -08:00
Corey Donohoe
f6cf01337f
apply patch for cve-2013-0277
2013-02-11 10:47:45 -08:00
Corey Donohoe
0ad86343c6
Merge pull request #1 from github/cve-2013-0333
...
Backport Patches for CVE-2013-0333
2013-01-28 16:33:32 -08:00
Corey Donohoe
42524c2bf1
backport patches for CVE-2013-0333
...
https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo
2013-01-28 13:23:53 -08:00
rick
46f1ddbff9
backport dynamic finder fix (CVE-2012-5664)
2013-01-02 15:02:25 -07:00
Aman Gupta
b18f5c9af1
bump mocha dependency
2012-12-08 20:35:13 -08:00
Aman Gupta
18e9b2ffc9
ignore "invalid byte sequence in UTF-8" from String#=~
2012-11-15 04:33:45 -08:00
Aman Gupta
9ec3637bc5
backport String#encoding_aware? and String#blank? encoding fixes from rails3
2012-11-13 20:50:29 -08:00
Aman Gupta
ba9248e6e3
Remove call to Kernel#gem
2012-11-09 14:47:38 -08:00
Joshua Peek
a27559cddf
Skip primary key check for HABTM inserts
2012-09-05 21:43:48 -05:00
Aman Gupta
e786726603
fix encoding errors inside ActiveSupport::BufferedLogger
...
http://developer.uservoice.com/blog/2012/03/04/how-to-upgrade-a-rails-2-3-app-to-ruby-1-9-3/
2012-08-17 18:14:52 -07:00
Aman Gupta
a1d2a22047
fix TZInfo on ruby 1.9
...
http://developer.uservoice.com/blog/2012/03/04/how-to-upgrade-a-rails-2-3-app-to-ruby-1-9-3/
2012-08-16 11:52:43 -07:00
Aman Gupta
d43ecd5b32
fix multiple queries when chaining named scopes
...
https://rails.lighthouseapp.com/projects/8994/tickets/5410-multiple-database-queries-when-chaining-named-scopes-with-rails-238-and-ruby-192
2012-08-15 17:35:23 -07:00
Aman Gupta
61359bf6ad
Use String#encode to do transliteration on ruby 1.9
2012-08-15 11:30:20 -07:00
Aman Gupta
a2beda1177
force binary strings when logging sql statements
2012-08-14 12:52:51 -07:00
Aman Gupta
52c895d565
handle load errors on 1.9
...
https://github.com/rails/rails/pull/3745
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/81be70a119260e59?pli=1
2012-08-14 12:52:31 -07:00
Aman Gupta
74f90612ec
avoid iconv require warning on 1.9
2012-08-14 12:52:01 -07:00
Justin Collins
a6eb61b7e4
Fix SQL injection via nested hashes in conditions
2012-06-12 23:14:10 -07:00
Ryan Tomayko
fe11782158
Merge remote-tracking branch 'github/rack-1.x' into 2-3-github
2011-11-17 12:57:09 -08:00
Ryan Tomayko
899e99a025
pin to rack ~> 1.1 instead of ~> 1.1.0
...
Some pretty gnarly bugs and security issues are present in the
latest rack 1.1.x release. There are 1.2.x and 1.3.x releases that
correct these.
This changes the gem dependencies to allow for rack versions > 1.1.
At GitHub we're on 1.2.4 (latest 1.2.x release at present) and
should have some results from real world testing soon.
2011-11-17 12:51:32 -08:00
Aaron Patterson
e0774e4730
fixing utf8 escape vulerability
2011-08-16 14:58:39 -07:00
Aaron Patterson
60f783d9ce
fixing strip tags vulnerability
2011-08-16 14:58:13 -07:00
Aaron Patterson
6b46d65597
fixing sql injection problem
2011-08-16 14:57:48 -07:00
Aaron Patterson
fb1588c5ff
2.3.14. yay. :'(
2011-08-16 14:57:05 -07:00
Aaron Patterson
dea5a10f71
bumping to 2.3.13
2011-08-16 14:34:14 -07:00
Aaron Patterson
11dafeaa75
fixing response splitting problem
2011-08-16 14:25:45 -07:00
Aaron Patterson
bb99aa1149
adding notification for rdoc
2011-08-16 14:24:44 -07:00
Aaron Patterson
b132992978
we should not ignore all gems in here
2011-08-04 16:34:20 -07:00
Xavier Noria
78a1fda7c8
contrib app minor tweak
2011-07-27 13:23:42 -07:00
José Valim
8d02083f23
Merge pull request #1740 from Antiarchitect/2-3-stable
...
Fix OrderedHash merging with block given.
2011-06-17 06:25:39 -07:00
Andrey Voronkov
b1c36b7088
Added tests for OrderedHash merging with block.
2011-06-16 23:56:39 -07:00
Andrey Voronkov
b2d4142fb7
Fix OrderedHash merging with block given.
2011-06-16 16:47:29 -07:00
Brian Cardarella
1aae5e70ef
Remove deprecation warning for ActiveRecord::Errors#generate_message. This is the same API that ActiveModel ended up using and that won't be changing.
2011-06-09 14:59:33 -07:00
Aaron Patterson
a2a34133d8
find the spec from the source index, then activate it
2011-06-06 20:22:47 -07:00
Ryan Davis
79aa54d0c7
+ Switched to newer rdoc and gem package tasks (and their requires).
...
+ Fixed deprecated usage in gemspecs.
Bumped the version to 2.3.12 so I could test locally with actual
installs. If this is bad form for this project, please beat me up and
I'll split them out.
2011-05-25 01:49:15 -07:00
Ryan Davis
3ad5fd1879
Removed the bulk of the deprecations by simply not calling refresh.
...
This may cause problems. I dunno.
The real solution is to get rid of all of this mess and use gem paths properly.
2011-05-12 16:02:41 -07:00
Ryan Davis
4c3725723f
Fixed buggy gem activation. Don't pass a dependency to gem, pass the
...
name and requirement. Better, just activate the spec for the
dependency (1.8 only)
2011-05-12 16:01:56 -07:00
Ryan Davis
c20a4d18e3
Removed buggy GemDependency#requirement override. Overrides should NEVER change the semantics of the parent (returning nil if default).
2011-05-12 16:01:10 -07:00
Ryan Davis
01a9fbbcca
Fix broken GemDependency#==. You should ALWAYS check the class!
2011-05-12 16:00:28 -07:00
Ryan Davis
8d4ca9edc6
Fix stupid emacsisms. Just makes things more readable.
2011-05-12 16:00:03 -07:00
José Valim
d793a56121
Merged pull request #198 from robdimarco/2-3-stable.
...
Patch for issue 6440 - Session Reset undefined method `destroy' for {}:Hash
2011-04-28 00:37:53 -07:00
José Valim
f424efe97f
Merged pull request #331 from daphonz/2-3-stable.
...
Dynamic find_or_create_by_x_and_y always creates new records in Rails 2.3.11
2011-04-28 00:20:15 -07:00
Casey Dreier
9f7ff621bd
Fixing dynamic finders on associations to properly send arguments to the find_by_* method. Closes issue #330 .
...
Commit fdfc8e3b9 introduced a bugfix to prevent additional values passed
to a dynamic find_or_create_by_x methods from confusing the finder.
This patch also broke the essential behavior of this method on an
association by incorrectly sending arguments to the find_by_x methods.
The finder method would always see its inputs as a single array of
values instead of individual arguments, almost guaranteeing that the
finder call would be incorrect, and that we'd always create a new
record instead.
This patch adds a splat operator to the parameter array we send along to
the dynamic finder so that it receives its inputs correctly, and
includes an additional test to ensure that repeated calls to
find_or_create_by_x only creates one new record.
2011-04-27 21:57:24 -04:00
gmarik
b0be721dd9
respect :expire_after option
...
- it was broken after
[commit](e0eb8e9c65 )
- there's also
[issue](https://rails.lighthouseapp.com/projects/8994/tickets/6634-railsrack-inconsistency-about-expires_afterexpires-cookie-option )
- also: maybe it worth making Rack understand :expire_after as we
duplicate same logic in [cookie_store](https://github.com/gmarik/rails/blob/v2.3.11/actionpack/lib/action_controller/session/cookie_store.rb#L114 )
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-04-14 13:48:35 +02:00
Rob Di Marco
8ca8ac379d
Fixed bug 6440 by checking that destroy exists on the session
2011-02-28 22:54:03 -05:00
Rob Di Marco
589ce09564
Unit test that shows calling reset session twice results in an exception
2011-02-28 22:53:36 -05:00
Vijay Dev
6c42c142e2
fix incorrect version in deprecation message
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-02-20 13:32:18 -02:00
Aaron Patterson
abc06a2f76
rubygems 1.5.0 compatibility. Thanks Tim Serong
2011-02-09 15:24:14 -08:00
Michael Koziarski
b0c3d451a2
Prepare for the 2.3.11 release
2011-02-09 09:30:53 +13:00
Michael Koziarski
7e86f9b4d2
Change the CSRF whitelisting to only apply to get requests
...
Unfortunately the previous method of browser detection and XHR whitelisting is unable to prevent requests issued from some Flash animations and Java applets. To ease the work required to include the CSRF token in ajax requests rails now supports providing the token in a custom http header:
X-CSRF-Token: ...
This fixes CVE-2011-0447
2011-02-09 09:20:17 +13:00
Michael Koziarski
abe97736b8
Be sure to javascript_escape the email address to prevent apostrophes inadvertently causing javascript errors.
...
This fixes CVE-2011-0446
2011-02-09 09:20:16 +13:00
Aaron Patterson
7e0f60d2ed
fixing invalid yaml [ #4418 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2011-02-01 13:30:58 -08:00
Jamis Buck
3afa5385c9
Revert "make TestCaseTest work for pre-1.9 rubies, too"
...
This reverts commit 8378a44ff9 .
2011-01-19 15:57:16 -07:00
Jamis Buck
c545331f9e
Revert "scrub instance variables from test cases on teardown"
...
This reverts commit b5cf2b4b82 .
2011-01-19 15:57:16 -07:00
Jamis Buck
cd0ecff00b
Revert "rein in GC during tests by making them run (at most) once per second"
...
This reverts commit a0c761dc6b .
2011-01-19 15:57:14 -07:00
Jamis Buck
a0c761dc6b
rein in GC during tests by making them run (at most) once per second
...
this can provide a significant performance boost during testing, by
preventing the GC from running too frequently.
2011-01-19 10:27:53 -07:00
Jamis Buck
b5cf2b4b82
scrub instance variables from test cases on teardown
...
this prevents test state from accumulating, resulting in leaked
objects and slow tests due to overactive GC.
2011-01-19 10:12:18 -07:00
Jamis Buck
8378a44ff9
make TestCaseTest work for pre-1.9 rubies, too
2011-01-19 10:08:02 -07:00
Johnathan Ritzi
4f0c8ef9f1
Fix doc for #check_box [ #6311 state:resolved]
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2011-01-19 08:47:19 +01:00
Jeremy Kemper
bc302f2aec
Revert "use Object#class instead of Object#type"
...
This reverts commit 08d94d3f7e .
2011-01-10 14:14:25 -08:00
Tomasz Pajor
08d94d3f7e
use Object#class instead of Object#type
2011-01-09 15:12:25 -08:00
Mikel Lindsaar
10ec012f58
Updating documentation on ActionMailer base to show a multipart email with attachments
2011-01-02 11:13:44 +11:00
Mikel Lindsaar
92fd824480
Correcting actionmailer guide for Rails 2.3
2011-01-02 11:08:44 +11:00
Michael Koziarski
6d916329b8
Require thread explicitly rather than relying on rubygems to do it.
2010-12-20 11:16:55 +13:00
Michael Koziarski
84465a2cc1
Revert "In nested_attributes when association is not loaded and association record is saved then in memory record attributes should be saved"
...
This reverts commit 12bbc34aca .
It caused errors when combined with attr_accessible, piggy back attributes fetched by :select, etc. Leaving it in 3.0, but removing from 2.3
2010-12-08 09:48:54 +13:00
Will Bryant
0fee359278
Don't add non-new records back to the target array after loading targets on associations, as that makes destroy_all destroy any created records that don't match the scope destroy_all is called on
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-12-08 09:48:16 +13:00
Pascal Friederich
e0eb8e9c65
Let Rack::Utils.set_cookie_header! create the Set-Cookie header instead of manually fiddling with the response headers [ #4941 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-01 11:58:45 +01:00
José Valim
2826324e56
Revert "Fix AbstractStore so that it preserves Set-Cookie header as an array, rather than as newline separated strings"
...
This reverts commit 36b91e34f4 .
Conflicts:
actionpack/test/activerecord/active_record_store_test.rb
2010-12-01 11:48:31 +01:00
Alexandru Catighera
1681ede605
Fix ActiveRecord calculations when grouped by multiple fields
2010-11-16 11:06:49 -08:00
Tom Stuart
44db47c63e
Backport BlankSlate removal from ActiveSupport::BasicObject [ #5911 state:resolved]
...
This is a backport of dd15a3fee0 .
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk >
2010-11-03 11:03:38 +00:00
Andrew White
25139ac92c
Don't write out secure cookies unless the request is secure
2010-10-27 15:04:29 +01:00
Andrew White
0e52a609fd
Don't create a deprecation proxy object if the variable was passed in local_assigns [ #1671 state:resolved]
2010-10-26 12:57:21 +01:00
Aaron Patterson
df78de2bc8
removing space errors
2010-10-21 10:30:18 -07:00
Omar Qureshi
36b91e34f4
Fix AbstractStore so that it preserves Set-Cookie header as an array, rather than as newline separated strings
2010-10-21 10:28:54 -07:00
toby cabot
bdfddb09d7
bug 1108: yield to block provided to find_or_create_by_x
...
Starting in 2.3.8 we stopped yielding to blocks passed in to
find_or_create_by_x methods. This patch restores that behavior and
adds a case to test it.
2010-10-20 17:23:54 -07:00
toby cabot
fdfc8e3b9c
bug 1108: fix a bug with find_or_create_by and additional values
...
There was a bug with find_or_create_by_x introduced in 2.3.9 - if you
included extra parameters for the create() then those parameters would
confuse the find() so you'd never get to the create(). This patch
filters the parameters so we only pass to find() the subset that it's
interested in. The code for the filtering was modelled on the code in
base.rb's method_missing().
2010-10-20 17:23:54 -07:00
Michael Koziarski
f5ed5c317e
Prepare for the 2.3.10 release
2010-10-15 08:41:59 +13:00
Michael Koziarski
96183e0f28
Revert 7d2173ec5c which introduced a security vulnerability.
...
This addresses CVE-2010-3933
2010-10-15 08:30:34 +13:00
Geoff Buesing
f2e32e4fd7
require 'uri' in action_controller/url_rewriter [ #5555 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-10-12 00:58:29 +02:00
Aaron Patterson
8beb84fa33
calling correct method on minitest for test name when teardown callback fails
2010-10-04 09:29:37 -07:00
Aaron Patterson
a448e74661
[ #5406 state:resolved] calling the correct method on minitest to obtain the test name
2010-10-04 09:28:21 -07:00
Aaron Patterson
fb526a0470
fixing space errors
2010-09-30 10:29:46 -07:00
Marcelo Giorgi
96c19ff7cc
AssociationCollection#include? working properly for objects added with build method [ #3472 state:resolved]
2010-09-30 10:28:25 -07:00
Marcelo Giorgi
9b78af95be
Remove duplication of conditions generated for associations when used in conjunction with named_scopes [ #4634 state: resolved]
2010-09-30 09:04:04 -07:00
Emilio Tagua
5a63df211d
Add examples to performance script that were included in version 3.
2010-09-30 09:54:01 -03:00
Emilio Tagua
1851596db5
Use detect instead select to avoid sh [..] command not found.
2010-09-30 09:52:47 -03:00
Marcelo Giorgi
0665182950
Preserving :include options for hmt association with an order but without conditions [ #5262 state:resolved]
2010-09-28 09:56:10 -07:00
Ryan Wallace
515917f5d8
Add test to demonstrate failure with eager loading hmt where the association has an order.
2010-09-28 09:54:32 -07:00
Étienne Barrié
bc52d81306
Fix add_index with a symbol #4891
2010-09-27 10:26:01 -07:00
Michael Koziarski
dbbf2fd19c
Revert "Makes form_helper use overriden model accessors backport"
...
This change introduced breakages and test failures.
This reverts commit 8141f0894e .
2010-09-27 12:20:54 +13:00
Andrew Kaspick
9476d628a3
memoized protected methods should remain protected
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-09-27 11:50:54 +13:00
Colin Casey
7240e8af6a
Fix for imposed version number as last part of gem directory name for frozen gems
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 13:16:51 +02:00
Colin Casey
f2990620d7
Test for imposed version number as last part of gem directory name for frozen gems
...
[#4295 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 13:16:50 +02:00
W. Andrew Loe III
17f2fb44c0
Only send secure cookies over SSL.
2010-09-14 11:52:40 -07:00
Emilio Tagua
8c049c6b20
Add more examples in performance script.
...
[#5610 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-09-10 13:15:46 -07:00
Jeremy Kemper
761c9cd5db
Ruby 1.9 compat: convert Pathname to string
2010-09-10 12:23:41 -07:00
Andrew Kaspick
a159fd0b8c
Fix fixtures in integration test sessions
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-09-10 10:45:23 +12:00
Erik Michaels-Ober
e8b84ab1b4
Add support for mysql2 adapter
2010-09-10 02:13:56 +08:00
Erik Michaels-Ober
383ea02e38
Fix typo in deprecation warning
...
Object#returning should be Kernel#returning
2010-09-10 02:13:56 +08:00
Mikel Lindsaar
597fb1da94
Adding documentation to redirect_to and status code option references
2010-09-09 14:00:09 +10:00
Mislav Marohnić
c6e33d30c1
fix setting session cookie with activerecord and memcache store
...
Commit f8f3653 broke setting the session ID cookie for requests without 'HTTP_COOKIE' header
when using activerecord or memcache store. Integration tests didn't catch this because they
always set the HTTP_COOKIE header for mock requests, so now this is changed to only set the
header if there are cookies.
[#5581 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-08 12:59:48 -03:00
Jeremy Kemper
a61a39ecd4
Rails 2.3.9
2010-09-04 14:36:40 -07:00
Ken Collins
b64d1fe637
Conversion of a two dimensional array that is ruby 1.8.6 safe. Fix paren warnings too.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-09-03 14:38:28 +12:00
Jeremy Kemper
6f17422ca7
require 'thread' for Mutex dependency
2010-08-31 16:38:52 -07:00
Mikel Lindsaar
bac12fa5fc
Adding option to ActiveResource to allow you to not reset the previously stored requests and responses by passing false to respond_to
...
Backport of commit 2a1b23f851ea3d4634fc68b74fe6b1afed23d3ef on rails/master
2010-08-29 22:55:02 -07:00
Mikel Lindsaar
56fdfeb265
Back porting HttpMock test from Rails 3 master
2010-08-29 22:55:02 -07:00
Mikel Lindsaar
881712cf50
Updating documentation on ActiveResource HTTP Mock and also adding test coverage
2010-08-29 22:55:02 -07:00
Jeremy Kemper
b2c91983dc
Prepare for Rails 2.3.9. Release 2.3.9.pre gems.
2010-08-29 20:19:05 -07:00
Jeremy Kemper
bdace5d6aa
Exclude guides from gem to keep file size small
2010-08-29 17:54:13 -07:00
Mikel Lindsaar
0fcb4302e1
Make ActiveResource::InvalidRequestError more user friendly
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-08-25 10:11:06 +02:00
Xavier Noria
11361a9e79
restores railties/README as home page of the API
2010-08-20 04:19:34 +02:00
Xavier Noria
add3ccbca6
revises guides generation
2010-08-20 04:13:15 +02:00
Jeff Lawson
d35a67bba3
Bug Fix -- clean up connection after stored procedure [ #3151 state:resolved] for 2-3-stable
2010-08-18 08:33:47 -07:00
Jeff Lawson
7e79889d1c
Bug Fix -- clean up connection after stored procedure [ #3151 state:resolved] for 2-3-stable
2010-08-18 08:33:47 -07:00
Santiago Pastorino
43e2bbe28e
Making time_zone_options_for_select return a html_safe string master backport
2010-08-15 10:07:38 -03:00
Michael Koziarski
b154b97ea4
Revert "Ruby 1.9.2: explicitly raise NoMethodError for attempts at explicit coercion"
...
This reverts commit 64082b350c .
This change broke compatibility with 1.8.6 and was only needed for older 1.9.2 versions
Conflicts:
activerecord/lib/active_record/attribute_methods.rb
2010-08-11 10:53:06 +12:00
Xavier Noria
15cafbe267
it is no longer true that load_paths are going to be removed in final
2010-08-05 00:04:43 +02:00
Subba Rao Pasupuleti
12bbc34aca
In nested_attributes when association is not loaded and association record is saved then in memory record attributes should be saved
...
[#5053 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-03 10:56:51 +02:00
Santiago Pastorino
8141f0894e
Makes form_helper use overriden model accessors backport
...
[#3374 ]
2010-08-01 19:49:45 -03:00
Leigh Caplan
27651c1fad
Test to ensure that falsy objects aren't wrapped by deprecation proxies
2010-07-26 09:54:26 -07:00
Leigh Caplan
a9ef2fd56c
Override new on proxy objects so that they never wrap nil or false.
2010-07-26 09:54:26 -07:00
Santiago Pastorino
ae63d5c90d
Changes Object#returning with Object#tap on guides
2010-07-25 17:10:37 -07:00
Santiago Pastorino
6f3896751a
Changelog update for Object#responding deprecation
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-25 23:08:50 +02:00
Santiago Pastorino
5b0f839054
Deprecates Object#returning in favor of Object#tap
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-25 22:49:10 +02:00
Santiago Pastorino
a5d8c95a7c
Changes the usage of Object#returning with Object#tap
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-25 22:49:06 +02:00
Subba Rao Pasupuleti
dec2c4f4e3
renaming test name to fix accidently override [ #5076 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-18 11:20:25 +02:00
Neeraj Singh
99cdea7cbe
update_attribute and updated_attributes! are now wrapped in a transaction
...
[#922 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-18 11:20:25 +02:00
Aaron Patterson
c2d13a9a53
changing fixtures back to superclass_delegating_accessor until we can convert them to class_attributes
2010-07-17 18:57:24 -07:00
Jon Yurek
fb615cd7fd
Fix for integration tests not serializing arrays in multipart forms correctly.
...
Signed-off-by: wycats <wycats@gmail.com >
2010-07-17 13:01:50 -05:00
Aaron Patterson
4ae4828953
backporting a couple missing files. sorry folks!
2010-07-16 08:41:53 -07:00
Michael Koziarski
f57ca87729
Only skip eager loading the code if dependency_loading is still enabled.
...
Otherwise rake tasks which depend on environment will get errors about missing constants.
2010-07-16 17:06:32 +12:00
Aaron Patterson
7b6383f263
fixing performance regression from 2.3.5 -> 2.3.8
2010-07-15 15:59:19 -07:00
Michael Lovitt
257a29d3cc
Sessions should not be created until written to and session data should be destroyed on reset. [ #4938 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-14 08:04:37 +02:00
Jacob Lewallen
8298bef72e
Set destroyed=true in opt locking's destroy [ #5058 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-14 08:03:02 +02:00
Mike Breen
046c900df2
A generated plugin's test are not run by 'rake test'
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 23:08:22 +02:00
Ken Collins
504f7cfbb3
Fix the #using_limitable_reflections? helper to work correctly by not examining the length of an array which contains false/true, hence always passing.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 23:08:11 +02:00
Grant Ammons
0963774c0a
fixes #2362 , eager loading :through associations will join the :source model if there are :conditions
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 23:08:05 +02:00
Mislav Marohnić
2d3bc99b0d
test that ActiveRecord destroy and destroy_all return destroyed records
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-07-08 11:35:56 -07:00
Mislav Marohnić
ba9c469113
add missing require to ActiveRecord "base_test.rb"
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-07-08 11:35:46 -07:00
José Valim
bfbdeeae30
Use bind instead of instance_exec cause it may be causing memory leaks. Also, provide a simpler and sane implementation for scoped. [ #5044 state:resolved]
2010-07-04 16:19:40 +02:00
Aaron Patterson
67e18c523c
fisting Session::AbstractStore#clear to actually clear the session. [ #5030 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-07-01 14:47:28 -07:00
James Le Cuirot
526f1e5f15
Don't remove scheduled destroys when loading an association.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-01 01:07:24 +02:00
Jan Berkel
f8f4872fcc
Backported patch from [ #4762 ]
...
URL fragments should not have safe characters escaped. Ref: Appendix A,
http://tools.ietf.org/rfc/rfc3986.txt
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-30 13:27:28 +02:00
Aaron Patterson
fad166c152
AssociationCollection#create_by_*, find_or_create_by_* work properly now. [ #1108 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-29 16:33:12 -07:00
Leigh Caplan
78e4d88c70
Rewrite the clause to pluck the existing value from zones_map before performing a lookup. [ #4942 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 17:54:18 +02:00
David Trasbo
ac42e6951f
Deprecate ActiveRecord::Base#class_name [ #379 state:committed]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 17:54:05 +02:00
David Trasbo
d0d10f51d7
Only tell users that the Rails gem is missing if it's actually the case [ #2901 state:committed]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 17:53:57 +02:00
Prem Sichanugrist
69c4e4ce65
Fix [ 54a5088cd5] where the i18n gem was wrongly updated to 0.4.1.
...
I've tested and confirm that `2-3-stable` will use the vendored `i18n` gem if there's no `i18n` gem with version >= 0.4.1 installed
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 17:53:48 +02:00
Leigh Caplan
80473e035a
test that unknown zones don't store mapping keys
...
[#4942 ]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 22:20:34 +02:00
Santiago Pastorino
70af7efa16
Don't store incorrect values in zones_map backport
...
[#4942 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 22:20:34 +02:00
Evgeniy Dolzhenko
56b35afbdd
Add module_eval missing file_name and line_number args
...
[#4712 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-27 08:49:54 +02:00
José Valim
0e9190c902
Tidy up tests in previous commit since they did not assure an OrderedHash is returned (the test would pass for an array and would pass by chance for hashes).
...
[#4875 state:resolved]
2010-06-26 18:16:09 +02:00
chaitanyav
449cf50d85
Add OrderedHash#invert to preserve order in ruby 1.8
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-26 18:13:45 +02:00
Paul Mucur
05defcd63a
Alias ActiveSupport::OrderedHash#update to ActiveSupport::OrderedHash.merge!
...
This ensures that an OrderedHash's keys are set up appropriately when using update.
[#4973 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-25 15:18:39 -07:00
Prem Sichanugrist
f8f365346e
Make sure that Rails doesn't resent session_id cookie over and over again if it's already there [ #2485 state:resolved]
...
This apply to only Active Record store and Memcached store, as they both store only the session_id, which will be unchanged, in the cookie.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-25 09:47:56 +02:00
Xavier Noria
4a745ca670
deprecates load_(once_)paths in dependencies and app config in favor of autolaod_(once_)paths
2010-06-24 00:00:45 +02:00
José Valim
68bfd8a392
Use size for Ruby 1.8.6 compatibility.
2010-06-23 17:53:02 +02:00
Neeraj Singh
549b2ad77c
fixes to the tests for patch #4909
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-23 17:34:45 +02:00
kane
09a23d2290
quote scoped columns in validates_uniqueness_of [ #4909 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-23 17:34:40 +02:00
George Montana Harkin
7d2173ec5c
Fixes #2415 by creating a new instance of the Model when saving attributes to that model and the associated attributes already exist. Tests included. [ #2415 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-23 17:31:22 +02:00
Neeraj Singh
cc53229378
Fragment cache not generating the proper cache key in log
...
[#4827 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-23 09:11:48 +02:00
Maxim Chernyak
844da12ba6
Fix eager loading of polymorphic has_one associations nested-included under polymorphic belongs_to associations. [ #3233 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-23 09:09:46 +02:00
Neeraj Singh
a9c69f3bb0
test for #1570
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-23 09:08:55 +02:00
Paweł Kondzior
687d7f52c4
STI should identify itself inside named_scope
...
[#1570 state:resovled]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-23 09:07:46 +02:00
Michael Koziarski
cbf36cf57c
Revert "make text_field and hidden_field omit the value attribute if the developer explicitly passes in :value => nil [ #4839 state:reopened]"
...
This reverts commit 52c922fad1
2010-06-23 16:54:05 +12:00
Michael Koziarski
52c922fad1
make text_field and hidden_field omit the value attribute if the developer explicitly passes in :value => nil [ #4839 state:resolved]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Conflicts:
actionpack/lib/action_view/helpers/form_helper.rb
2010-06-23 16:25:19 +12:00
Jeff Dean
da93d69bcb
remove_column should raise an ArgumentError when no columns are passed [ #4803 state:resolved]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-06-23 16:23:03 +12:00
Jeremy Kemper
e703fc101b
CI: add i18n gem
2010-06-22 14:11:14 -07:00
Jesse Storimer
85b6d79d8a
CookieStore should preserve the Set-Cookie header Array [ #4743 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-22 11:25:32 -07:00
Prem Sichanugrist
5ed6a8447b
Change all i18n interpolations from {{...}} to %{...}
...
This will silent all warning if there's a i18n version 0.4.x gem install on user's machine.
[#4913 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-21 01:14:36 +02:00
Prem Sichanugrist
54a5088cd5
Update bundled i18n gem to 0.4.1 to make sure every project will be warn about using deprecated %{..} interpolation.
...
This will also make sure that by changing {{..}} into %{..} won't break any Rails 2.3.x application, since it would load the vendored version if it's not satisfy the version requirement.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-21 01:13:37 +02:00
James Le Cuirot
08302d2feb
When not overwriting unsaved updates in nested attributes, allow already-saved records to be refreshed.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-20 00:33:39 +02:00
Maxime RETY
c7e875abdb
Fix Yajl backend discovery in ActiveSupport::JSON
...
[#4897 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-18 20:12:16 -07:00
Master Lambaster
1ac00a6844
Fix test which prevents connection reset on failing and remove hardcoded connection
...
[#4689 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-18 15:28:56 -07:00
Pratik Naik
e4accdec0c
Fix AR perf script
2010-06-10 00:00:17 +05:30
James Le Cuirot
b41c3ba154
Don't overwrite unsaved updates when loading an association but preserve the order of the loaded records. [ #4642 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-06-09 18:20:15 +05:30
Prem Sichanugrist
0f44d37d04
Make sure that rails recognized the full notation of IPv6 loopback address, and recognize 127.0.0.0/8 in IPv4
...
[#3257 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-08 19:47:18 +02:00
Xavier Noria
ed8cabcec2
deprecates Array#random_element in favor of Array#sample, backported from Ruby 1.9, thanks to Marc-Andre Lafortune
2010-06-05 02:11:33 +02:00
Andrew
3d6ed50187
Don't rewrap system level exceptions with StatementInvalid
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#896 state:committed]
2010-05-29 16:00:54 +12:00
Michael Koziarski
b760d699a8
Merge commit 'mislav/counter_cache_2-3-stable' into 2-3-stable
2010-05-29 14:05:31 +12:00
Michael Koziarski
5796a92433
Merge commit 'mislav/auto_link_2-3-stable' into 2-3-stable
2010-05-29 14:05:21 +12:00
Santiago Pastorino
b1a97a4998
removes an unneeded alias
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-26 16:10:31 +02:00
Jeremy Kemper
a815f0c5a3
Shift SafeBuffer#concat responsibility over to rails_xss
2010-05-25 14:27:40 -07:00
Jeremy Kemper
9da7ff8842
Bump 2-3-stable to 2.3.9
2010-05-25 09:50:34 -07:00
Xavier Noria
2ed893bdce
get railties/README back to the home page of the API
2010-05-25 17:18:50 +02:00
Santiago Pastorino
240f4e944c
SQLite: forward compatibility with future driver releases
...
[#4633 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-24 20:53:26 -07:00
Jeremy Kemper
f7e27bd078
i18n: t() handles single keys returning an Array, also
2010-05-24 20:41:28 -07:00
Jeremy Kemper
6a9e188c0c
HTML safety: fix textarea with nil content
2010-05-24 20:13:07 -07:00
Jeremy Kemper
aa449141b4
Work around strange Ruby 1.9 autoload issue by using absolute load paths for tests (for Active Model too)
2010-05-24 16:18:29 -07:00
Santiago Pastorino
a9032c885f
Error messages for asserts
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-24 16:05:39 -07:00
Jeremy Kemper
e8ba5265e0
Work around strange Ruby 1.9 autoload issue by using absolute load paths for tests (ditto for other components' tests)
2010-05-24 16:05:34 -07:00
José Valim
50f3754525
Ensure translations work with symbols.
2010-05-24 23:38:49 +02:00
Santiago Pastorino
4986d5ed04
translate helper method using an array is deprecated
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 23:38:48 +02:00
Jeremy Kemper
4fef5af9c3
2.3.7.pre1: fixes HTML escaping when *not* using rails_xss
2010-05-24 14:02:38 -07:00
Jeremy Kemper
e5af56abfe
Add global gem task
2010-05-24 13:48:13 -07:00
Jeremy Kemper
9d3bd87045
Work around strange Ruby 1.9 autoload issue by using absolute load paths for tests
2010-05-24 12:16:33 -07:00
Santiago Pastorino
6b0616d1b8
translation method of TranslationHelper module returns a SafeBuffer Array backport
...
[#4675 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 20:56:44 +02:00
Santiago Pastorino
d3da1a2c66
Revert "translation method of TranslationHelper module returns always SafeBuffer [ #4194 status:resolved]"
...
This reverts commit 2310aef29b .
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 20:56:44 +02:00
wycats
8e6a044b2b
Needs to work on 1.8 too
2010-05-24 11:29:12 -07:00
wycats
50b7c0c104
Give the ERB String the encoding of the original template
2010-05-24 11:18:20 -07:00
Jeremy Kemper
c66013e2c5
Fix that captured content (e.g. with form_for or div_for) would be HTML-escaped even without the rails_xss plugin installed. Rails 2.3.7, we barely knew ya...
2010-05-24 09:12:00 -07:00
Lance Ivy
9e08e196fa
Ensure auto_link does not ignore multiple trailing punctuations
...
[#2504 state:resolved]
2010-05-24 11:47:36 +02:00
Mislav Marohnić
17b4fd25e4
avoid auto_linking already linked emails; more robust detection of linked URLs
...
References #1523 [#1862 state:resolved] [#3591 state:resolved]
Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination with `raw`.
Let link text be automatically HTML-escaped
[#2017 state:resolved]
2010-05-24 11:18:20 +02:00
Mislav Marohnić
bd9ca9aed0
auto_link: support arbitrary URI schemes like "ftp:" and "file:"
...
recognizes all URI scheme allowed characters, such as colon and period.
[#3494 state:resolved]
2010-05-24 11:18:20 +02:00
Jeremy Kemper
f97da34b4f
Bump 2-3-stable to 2.3.8
2010-05-24 01:39:19 -07:00
Jeremy Kemper
326188c25e
2.3.7 release: fix rails_xss compatibility
2010-05-24 00:04:41 -07:00
Jeremy Kemper
60e82a3ca2
Move tests for deprecated String#html_safe! to plugin
2010-05-23 22:07:47 -07:00
Jeremy Kemper
3ff921a65a
rails_xss handles deprecated String html safety, when installed
2010-05-23 21:30:43 -07:00
Santiago Pastorino
b10bf834b7
Make use of safe_concat on TextHelper concat
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-23 16:51:52 -07:00
Jeremy Kemper
86f0287993
Revert "Don't always mark the argument to #concat as HTML-safe."
...
This reverts commit e53791f8c0 .
2010-05-23 16:51:47 -07:00
Jeremy Kemper
ab2d7c8b5d
Use a non-XSS-protected output buffer for view tests
2010-05-23 16:21:44 -07:00
Jeremy Kemper
ca5f5d97b9
Fix test rendering unmarked but safe HTML
2010-05-23 15:28:40 -07:00
Nathan Weizenbaum
e3f14d12cd
Don't incompatibly monkeypatch ERB.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-23 15:02:24 -07:00
Nathan Weizenbaum
e53791f8c0
Don't always mark the argument to #concat as HTML-safe.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-23 15:00:14 -07:00
Nathan Weizenbaum
48fbe7b0d8
Mark all raw HTML being concatted as HTML-safe.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-23 14:57:45 -07:00
Jeremy Kemper
55e88eeee4
Bump 2-3-stable to 2.3.7
2010-05-23 01:39:45 -07:00
Jeremy Kemper
56bb5504dd
2.3.6 release
2010-05-22 23:53:40 -07:00
Jeremy Kemper
d8f0a58dcb
Remove miscommit from 57337cd
2010-05-22 23:46:03 -07:00
Aaron Patterson
a637b5f447
backporting beda2d43 for newer sqlite-ruby bindings
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-05-22 20:52:15 +02:00
Xavier Noria
25ec61330b
1.9 compat: deprecated last_(month|year) in favor of prev_(month|year)
2010-05-19 00:59:02 +02:00
Jeremy Kemper
9d99e610be
Revert "Don't carry default value when changing column for a binary type on MySQL"
...
Broke mysql tests.
This reverts commit ddadcc7cf8 .
Conflicts:
activerecord/test/cases/migration_test.rb
[#3234 state:open]
2010-05-18 11:03:59 -07:00
Étienne Barrié
99bcce7ec1
make add_index and remove_index more resilient; new rename_index method; track database limits
...
[#3452 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-18 10:51:36 -07:00
Ian White
a5696e36c6
Nested records (re: autosave) are now updated even when the intermediate parent record is unchanged [ #4242 ]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-18 16:10:44 +02:00
José Valim
94878c61a3
Deprecate legacy CGI options in SessionStores.
2010-05-18 03:25:57 +02:00
Xavier Noria
bb2327d9ab
method rename to fix a broken test
2010-05-18 00:31:41 +02:00
Rizwan Reza
32b0b5f7b2
Deprecate Array#rand in favor of Array#random_element [ #4555 stated:committed]
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-05-17 23:56:44 +02:00
José Valim
76608b13d2
superclass_delegating_accessor does not accept options.
2010-05-17 12:37:42 +02:00
Jeremy Kemper
cd3d30d569
CI: bump rack to 1.1
2010-05-16 13:35:42 -07:00
Rizwan Reza
74206aeff2
Rack dependency bumped to 1.1.0, tests passing. [ #3558 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 22:19:25 +02:00
Wijnand Wiersma
5b1f4c51ce
Postgresql doesn't allow to change a string type column to a binary type. Skip this test for postgresql for now.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 15:15:16 +02:00
Jeff Kreeftmeijer
ec017e158a
Added assert_attribute_type to clean up GeneratedAttributeTest [ #2377 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 12:08:55 +02:00
Matthew Rudy Jacobs
5d979de1a9
when we run rake rails:freeze:edge update the value of the "REVISION" file rather than creating a new file "REVISION_ce706..." each time [ #1694 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 10:42:48 +02:00
Nobuhiro IMAI
e535b45c86
make fixture accessors private
...
prevent to be run fixture accessor (e.g. test_foos for TestFoo model) as a test case
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 10:35:23 +02:00
Neeraj Singh
3570f3e7f6
Fix broken integration test in 2.x [ #4565 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 10:32:53 +02:00
Jeff Kreeftmeijer
3568c5cee0
using :time_select when the attribute type is :time in the scaffold generator. [ #2377 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 10:32:15 +02:00
Elomar França
ddadcc7cf8
Don't carry default value when changing column for a binary type on MySQL [ #3234 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 10:30:47 +02:00
Lawrence Pit
0706bdce60
docs + test for each_error
...
[#3185 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-15 11:49:04 -07:00
Jeff Kreeftmeijer
5d7ad7ba41
make sure as is set before trying to build an #{as}_counter. [ #2804 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-15 11:18:31 -07:00
Neeraj Singh
22b020db3e
db:drop:all throws error when database does not exist [ #2997 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-15 10:33:52 -07:00
Jeff Kreeftmeijer
2de364636c
partial counters with :as [ #2804 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-15 10:32:45 -07:00
Josh Kalderimis
8e7a64d090
backported AR correction to find_each and find_in_batches to raise when the user uses select but does not specify the primary key
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-15 09:51:58 +02:00
José Valim
6949d6f54f
Remove deprecated tests according to 8e679f1
2010-05-14 23:43:21 +02:00
Santiago Pastorino
c4ef7bb2a0
to_json and to_xml tests added to ActiveResource
...
[#4529 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-12 13:40:09 -07:00
Pratik Naik
7cbc546d39
Use superclass_delegating_accessor for connection handlers
2010-05-12 17:43:02 +01:00
Jeremy Kemper
9ab1154523
Drop require removed by 8e679f1
2010-05-11 22:39:53 -07:00
Santiago Pastorino
ad73a3aec4
type_cast_calculated_value refactor: value is never a Fixnum here. Fix test since SQLite returns Float.
...
[#4514 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-11 22:28:36 -07:00
José Valim
8e679f1854
Remove i18n interpolation deprecation. It has been around since 2.2.
2010-05-11 22:13:03 +02:00
Pratik Naik
3c1bb40b6b
Make sure schema dumper doesnt throw up when there are no index lengths
2010-05-09 12:42:15 +01:00
Pratik Naik
77adb4bc20
Revert "Revert "Add index length support for MySQL [ #1852 state:resolved]" (breaks the build)"
...
This reverts commit eababa35cf .
2010-05-09 12:34:07 +01:00
Carl Lerche
eababa35cf
Revert "Add index length support for MySQL [ #1852 state:resolved]" (breaks the build)
...
This reverts commit 3616141fa2 .
2010-05-08 23:56:06 +03:00
Santiago Pastorino
555801c908
The intention here was to assign to different objects ht: Radar
2010-05-08 23:34:07 +03:00
Emili Parreno
3616141fa2
Add index length support for MySQL [ #1852 state:resolved]
...
Example:
add_index(:accounts, :name, :name => 'by_name', :length => 10)
=> CREATE INDEX by_name ON accounts(name(10))
add_index(:accounts, [:name, :surname], :name => 'by_name_surname', :length => {:name => 10, :surname => 15})
=> CREATE INDEX by_name_surname ON accounts(name(10), surname(15))
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-05-08 12:43:34 +01:00
Santiago Pastorino
f967b352d2
Make find_or_create and find_or_initialize work mixing explicit parameters and a hash. ht: Marc-André Lafortune
...
[#4457 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-07 13:29:51 -07:00
Santiago Pastorino
adcfb4e8bd
simple_format should return html_safe but not escape text, that's for rails_xss plugin [ #3767 state:committed]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-07 11:56:53 -07:00
Brian Lopez
6d1344de5e
add support for mysql2 adapter to dbconsole
...
[#4532 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-04 15:47:12 -07:00
Pratik Naik
f194d65f36
Use primary key in conditions, not 'id' [ #4395 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
Conflicts:
activerecord/test/cases/nested_attributes_test.rb
2010-05-04 22:45:16 +01:00
Jatinder Singh
aeff1719ab
AR JSON Serializer now supports custom root option.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-04 13:18:27 -07:00
Brian Lopez
6dbc75fd76
Allow pre-casted values (other than nil) to pass through from calculations un-touched
...
[#4514 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-04 12:27:24 -07:00
Pratik Naik
04fa5af6a6
Use class_inheritable_accessor for connection_handler
2010-05-04 17:52:53 +01:00
Marius Nuennerich
0d767fd24f
repair the activesupport message encryptor tests for me, do so in the same way as jeremy did with message verifier
...
[#4517 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-01 10:08:05 -07:00
Neeraj Singh
dcf0f97514
making rake:migrate VERSION=0 a noop called in succession. [ #2137 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-29 13:32:12 +02:00
Curtis Hawthorne
ce5af2fefe
Destroy respects optimistic locking.
...
Now works with :dependent => :destroy and includes unit tests for that
case. Also includes better error messages when updating/deleting stale
objects.
[#1966 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-27 21:52:22 -07:00
Joe Martinez
aa401bd75a
Add ActiveResource::Base.include_root_in_json, like Active Record, to serialize instances as hash of model name -> attributes hash rather than the bare attributes hash. [ #2584 state:committed]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-26 15:19:03 -07:00
Jeremy Kemper
9e262de3d8
Fix backport error: wrong exception name
2010-04-24 19:38:10 -07:00
Jeremy Kemper
8716ee44e5
Fix unstated AS::Multibyte dependency
2010-04-24 17:52:12 -07:00
Cezary Baginski
ec7716abcd
actionpack: added missing encoding comments [ #4466 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-24 17:30:59 -07:00
Jeremy Kemper
f6e71c674c
Expect an incompatible encoding exception when a template with a magic comment renders a partial without one and its source encoding doesn't match the default external encoding
2010-04-24 17:12:05 -07:00
Jeremy Kemper
fb545f4c60
Expect an incompatible encoding exception when a template doesn't have a magic comment and its source encoding doesn't match the default external encoding
2010-04-24 17:12:00 -07:00
Akira Matsuda
4082001331
Fix pattern to match various magic comment formats
2010-04-24 17:05:38 -07:00
Jeremy Kemper
70034d820f
Ensure ERB source begins with the encoding comment
2010-04-24 17:04:50 -07:00
Jeremy Kemper
81e06075b7
Ruby 1.9: ERB template encoding using a magic comment at the top of the file
2010-04-24 17:01:52 -07:00
Jeremy Kemper
457a54653d
Remove quoted_string_prefix entirely since PostgreSQL was the only database adapter relying on it.
2010-04-24 16:27:34 -07:00
Jeremy Kemper
5c0ad82236
PostgreSQL: remove the unnecessary heuristic checking whether the value is escaped
2010-04-24 15:52:51 -07:00
Jeremy Kemper
c9e15709ae
PostgreSQL: use standard-conforming strings if possible
2010-04-24 15:36:31 -07:00
Eugene Pimenov
cec44f5838
PostgreSQL adapter: escape_bytea, quote_string and unescape_bytea aren't thread-safe in Ruby 1.8 [ #3237 state:resolved]
...
Signed-off-by: wycats <wycats@gmail.com >
2010-04-24 13:12:14 -07:00
Sam Elliott and Santiago Pastorino
c401102a27
Is not nessesary to have @_rails_html_safe instance var when the string is unsafe, also it breaks to_yaml [ #3535 state:committed]
2010-04-23 09:35:18 +12:00
Santiago Pastorino
d891754535
load tzinfo on initialize only
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-04-21 09:24:46 -07:00
Santiago Pastorino
49943a7120
TimeZones lazy load
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-20 21:40:49 -07:00
Jeremy Kemper
2401af4d6f
MemoryStore#read_multi(*keys) for dev-mode compatibility with memcache store
2010-04-19 00:18:20 -07:00
Jeremy Kemper
fd5c6e2c97
Upgrade bundled i18n from 1.3.3 to 1.3.7
2010-04-17 12:38:16 -07:00
Jeremy Kemper
8b79c7c202
Fix 1.9-specific syntax error in test
2010-04-17 12:37:56 -07:00
Mislav Marohnić
4b36dafb35
String#starts/ends_with? should return false for non-string argument, not raise error
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-17 00:07:26 -07:00
Mislav Marohnić
8be3e09fcf
fix reset_counters to work even with complex class names
...
e.g. it guesses that a belongs_to association to Namespace::MyModel is
named "my_model", unlike before where it would look up an association
named "namespace::mymodel" and fail.
2010-04-17 03:13:13 +02:00
Mislav Marohnić
ef0591efc2
cleanup update/reset_counters; refactor tests
2010-04-17 03:13:00 +02:00
Jeremy Kemper
c55cdd816c
Distinguish test for 1.8.6 compat
2010-04-16 11:35:33 -07:00
Mislav Marohnić
c519215aa8
ruby 1.8.7 compat: starts/ends_with? doesn't cast to string
...
`starts/ends_with?` methods shouldn't cast argument to string because
ruby 1.8.7 doesn't seem to do that. for example:
"foobar".ends_with?(:bar)
# => true in ActiveSupport implementation, false in ruby 1.8.7
[#3199 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-16 11:22:50 -07:00
Eugene Pimenov
18ba648e0d
Implement find_in_batches without with_scope [ #2227 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-04-15 01:13:16 +01:00
Xavier Noria
b8b568e53b
fix dash -> edit in an example, and a few touches now that we are here
2010-04-14 11:57:36 -07:00
Pratik Naik
5efb1503dd
Ensure not to load the entire association when bulk updating existing records using nested attributes
2010-04-14 01:51:43 +01:00
Anil Wadghule
c69dc1afaa
Fix for plugin not getting installed on Windows environment [ #4320 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-12 11:12:42 +02:00
Yaroslav Markin
a84e9b4f31
Fix Array#to_xml to produce valid markup when working with namespaced classes [ #3624 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-10 18:16:46 +02:00
Vicki Ball
dae247316d
made error_message_on work by passing in the object name if there is no object [ #3246 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-10 14:02:34 +02:00
Jeremy Kemper
2cd29f4297
Only set response etag if body is not blank
2010-04-09 20:19:03 -07:00
Jeremy Kemper
d91d6fe15f
CI: show all headers for diagnosis
2010-04-09 20:06:35 -07:00
Jeremy Kemper
efec9b24db
Refactor for readability
2010-04-09 19:33:42 -07:00
Jeremy Kemper
56c5290fce
CI: message for some outstanding failures
2010-04-09 19:32:47 -07:00
José Valim
4a02437a8d
Fix a failure added on 958b0e977a
2010-04-09 22:19:49 +02:00
Santiago Pastorino
958b0e977a
fix stack trace lines on class_eval
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-09 22:06:51 +02:00
José Valim
f87a518f81
Fix tests broken in 0653a6d30e
2010-04-09 09:23:09 +02:00
Rolf Bjaanes
fcec7402eb
Changed the way inflections for uncountables work for 'funky jeans'
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-09 09:04:33 +02:00
David Heinemeier Hansson
0653a6d30e
Fixed that default locale templates should be used if the current locale template is missing [DHH]
2010-04-08 17:15:11 -07:00
Santiago Pastorino
cfb31edb54
Generate routes for nested resources with nil object raise RoutingError [ #4262 state:committed]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-06 21:28:51 -07:00
Simon Effenberg
1d7368200f
remove_index now uses quote_table_name() [ #4300 state:resolved]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-04-06 14:16:40 +12:00
Kristopher Murata
642d5d297e
Parameterize should accept malformed utf8 characters [ #4323 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-04 11:57:31 -07:00
Andrew White
e617af13a2
Backport of lazy evaluation of has_many ..., :dependent => :___
...
[#2627 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-04 07:01:38 -07:00
Jeremy Kemper
a72bcdb8ae
Check more carefully for vendored tzinfo
2010-04-02 14:39:03 -07:00
Jeremy Kemper
19161e08b3
Adjust test in case tzinfo is not available
2010-04-02 14:05:15 -07:00
Jeremy Kemper
e2ec41a9a6
CI: add tzinfo
2010-04-02 14:01:26 -07:00
Santiago Pastorino
2c148cd96a
delegate unknown timezones to TZInfo
2010-04-02 17:45:45 -03:00
Santiago Pastorino
de7925de8a
utc_offset is no longer required on TimeZone and if it's not supplied we delegate to TZInfo
2010-04-02 16:53:45 -03:00
Jeremy Kemper
aa48c79ae4
HTML safety: give a deprecation warning if an array of option tags is passed to select tag. Be sure to join the tag yourself and mark them .html_safe
2010-03-31 19:49:29 -07:00
David Heinemeier Hansson
1668ad3baf
Added Object#presence that returns the object if it's #present? otherwise returns nil [DHH/Colin Kelley]
2010-03-31 18:27:08 -07:00
Pratik Naik
1f44fc90c6
Dont use Rails 3 finder syntax in Rails 2.3.x test [ #4303 state:resolved]
2010-03-31 14:14:56 +01:00
Pratik Naik
0e57c70baf
Dont try to load the record from the db if preloading didn't find anything
2010-03-31 12:57:06 +01:00
Xavier Noria
a0454dcd1a
avoid method redefined; discarding old empty? warning [Santiago Pastorino]
2010-03-30 17:23:44 -07:00
Santiago Pastorino
e329eab0c9
Don't cache the utc_offset we are already caching the timezone [ #4301 ]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-30 16:36:28 -07:00
Juanjo Bazan
4b08679ba9
New assertion: assert_present
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-03-30 16:02:40 -07:00
Juanjo Bazan
ccb1beeb5b
new assertion: assert_blank
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-03-30 15:59:09 -07:00
Joseph Wilk
ea6ef768a7
Fixed a bug where create_table could not be called without a block [ #2221 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-03-30 15:00:44 +13:00
Dudley Flanders
bf563bd904
Trivial doc update on nested attributes delete renaming
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-03-30 01:40:51 +02:00
Joey Aghion
715b34fdff
use supplied primary key when eager-loading belongs_to associations rather than default primary key
...
[#765 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-29 15:33:45 -07:00
Ernie Miller
00b95eb265
belongs_to associations now honor :primary_key option for joins
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-29 15:33:37 -07:00
Andrew White
03d5d0b5f5
Add the ability to specify table_name_prefix on individual modules
...
[#4032 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-29 08:55:21 -07:00
Santiago Pastorino
bc2af911f9
backport of inconsistency with cattr_reader and matter_reader with some tweaks
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-28 14:03:27 -07:00
Santiago Pastorino
0f18904e2b
flatten not needed here
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-28 14:03:27 -07:00
Santiago Pastorino
cf7ed7cf2d
Time marshalling backported [ #4286 state:committed]
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-28 14:03:07 -07:00
Joe Rafaniello
c1b2200085
Marshaling a time object added an instance variable to the object which affected the quoting of serialized attributes because the to_yaml of the original object did not match the to_yaml of the marshaled one. Also, Marshal.dump was modifying the source object which the client may not be aware of.
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-27 04:33:19 -07:00
José Valim
157c1808b9
Added compatibility to Ruby 1.9.2.
2010-03-26 20:21:07 +01:00
Emilio Tagua
ac7b5a23ba
Allow deprecation messages with or without a final period.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-03-25 15:44:16 +01:00
Rodrigo Kochenburger
0022fa309b
Set mailer template_root as absolute path [ #2263 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-03-25 15:36:12 +01:00
Tom Lea
97e07a88fe
Fix incorrect relative paths being used when looking up templates.
...
The bug will manifest itself by failing to locate templates when running tests,
or when running as a daemon (from /).
It relates the the different behavior of ActionView::Template::Path#to_s and
ActionView::Template::Path#to_str when a RAILS_ROOT is defined. #to_s reports
a path relative to the root, and #to_str reports an absolute path.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-03-25 15:33:05 +01:00
Santiago Pastorino
629afe9f19
ActionView::SafeBuffer should be there for backwards compatibility [ #4241 state:committed]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-03-22 14:07:53 +13:00
Bruno Michel
26f2cce232
button_to should generate an html_safe string
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-03-22 14:07:42 +13:00
Jeremy Kemper
c0137f62d4
Don't rely on Active Support being loaded here
2010-03-16 19:45:00 -07:00
Jeremy Kemper
f175d19e2a
Bundler returns a Pathname from #loaded_from; work around it
2010-03-16 17:55:25 -07:00
Santiago Pastorino
9cfa87519d
scope_key_by_partial fix for Ruby 1.9 when there's virtual_path
...
[#4202 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-16 16:05:24 -07:00
Santiago Pastorino
2310aef29b
translation method of TranslationHelper module returns always SafeBuffer [ #4194 status:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-16 13:49:59 -07:00
James Golick
27aa22826c
Improve performance of multibyte utils.
...
Switch from using String#match to using String#=~. There's no need to
generate a MatchData for each iteration since we're not using it.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-16 10:04:33 -07:00
Manfred Stienstra
2d3c58068c
Improve performance of Multibyte::Utils.
...
Replace explicit for-loops by faster enumeration methods.
[#3158 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-16 10:04:33 -07:00
Santiago Pastorino
374e49b467
Change array entries to safe doesn't worth then the array is joined as a string losing the safe property of his entries
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-03-16 13:14:58 +01:00
Santiago Pastorino
ebf300f41b
object_and_class_ext_test warnings removed
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-15 19:07:31 -07:00
Jeremy Kemper
b3d32a5b28
to_str works here
2010-03-15 11:19:46 -07:00
Bas Van Klinkenberg
b99914cc3e
Fixed a bug in JSON decoding with Yaml backend, where a combination of dates, escaped or unicode encoded data and arrays would make the parser fail with a ParseError exception.
...
[#2831 ]
Signed-off-by: Yehuda Katz <wycats@gmail.com >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-14 21:50:22 -07:00
Jeremy Kemper
9b209e8cb8
read_ and write_fragment cache preserve html safety yet cache strings only
2010-03-14 18:55:13 -07:00
Santiago Pastorino
056f957b22
There's a Ruby issue with File.basename different versions returns different things, so we shouldn't test that
...
[#4174 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-14 13:37:30 -07:00
Jeremy Kemper
40c393cb84
Be sure to pass through args to to_yaml
2010-03-11 18:37:36 -08:00
Jeremy Kemper
eed8a8863d
Write strings to fragment cache, not outputbuffers
2010-03-11 17:32:26 -08:00
Jeremy Kemper
ec760a57d1
OutputBuffer#to_yaml should return string yaml, not some custom class dump
2010-03-11 17:08:33 -08:00
Sam Ruby
cbc0201a3e
Add deprecation warning for overwrite_params and remove rdoc
...
[#4073 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-10 16:26:04 -08:00
Jeremy Kemper
abb8fbde73
Disprefer JSONGem decoder since it only decodes JSON objects
2010-03-09 11:06:31 -08:00
Aaron Patterson
5a806f6759
converting inject to each and map
...
[#4119 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-06 20:32:19 -08:00
Stijn Mathysen
f6f75e84c5
Removed the + sign as an accepted character from the parameterize method, as a + sign is interpreted by the browser as a space, possibly resulting in a "ArgumentError: illegal character in key"
...
[#4080 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-05 14:10:37 -08:00
Santiago Pastorino
d3a8152203
Adds disable option to date_helpers generated hidden fields when html_options specifies it. ht by Marc Schütz
...
[#3807 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-05 13:49:23 -08:00
Jeremy Kemper
3969148a13
Deprecate omitting the leading slash on a path arg to assert_redirected_to
2010-03-02 14:14:37 -08:00
Bryan Helmkamp
1e64cdf8c9
Bump version constants to 2.3.6 to more easily support generating prerelease gems
2010-03-01 18:24:55 -08:00
Jeremy Kemper
f56a1631be
Typo: _tasks -> _paths
2010-02-26 08:54:42 -08:00
Jeremy Kemper
f4ce042795
Add *.gem, pkg, and .bundle to .gitignore. Remove globs that should be in user's global ignores.
2010-02-26 08:10:33 -08:00
Jeremy Kemper
ed7322f336
Deprecate toplevel plugins tasks in favor of lib/tasks for Rails 3 forward compat
2010-02-26 08:09:41 -08:00
Tobias Bielohlawek
b06e5dce97
fixed a 'RecordNotFound' bug when calling 'reload' on a object which doesn't met the default_scope conditions, added test [ #3166 status:resolved]
...
The reload method didn't made use of 'with_exclusive_scope' when reloading the object. This lead to a RecordNotFound exception, in case the object doesn't met the default_scope condition (anymore) - which is obviously a bug. This quick fix makes use of with_exclusive_scope in the reload method as well. See test for full example.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-26 11:39:15 +01:00
Jeremy Kemper
5695b1bdd9
Fill in for I18n.normalize_translation_keys removed from 0.3.4
2010-02-25 15:16:49 -08:00
Christoph Schiessl
268c9040d5
remove rubygems (version >= 1.3.6) deprecation message by replacing Gem::Dependency#version_requirements with Gem::Dependency#requirement
...
[#4026 state:committed]
Signed-off-by: Prem Sichanugrist <s@sikachu.com >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-25 12:53:14 -08:00
Jeremy Kemper
63a7ef0d74
Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice.
2010-02-25 11:11:09 -08:00
Jeremy Kemper
3a3fa7f817
Missed singleton_class
2010-02-25 10:54:36 -08:00
Jeremy Kemper
5b4e7c3fa0
Missing fileutils require
2010-02-24 18:54:49 -08:00
Santiago Pastorino
0307dbaba9
add time_separator for minutes only if minutes aren't hidden
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-24 18:41:29 -08:00
Santiago Pastorino
39bcf14b34
missing html_safe added and tests
2010-02-19 15:34:18 -08:00
Santiago Pastorino
24911757de
missings html_safe added
2010-02-19 14:36:49 -08:00
Santiago Pastorino
64d28f61ad
ruby 1.9 array.to_s returns a string representing an escaped array
2010-02-19 14:04:03 -08:00
Santiago Pastorino
397262a4ee
i18n translate with arrays issue solved
2010-02-19 14:03:50 -08:00
Santiago Pastorino and José Ignacio Costa
62c802c622
html_escape mail_to when encode javascript and not hex
2010-02-19 13:40:05 -08:00
Santiago Pastorino and José Ignacio Costa
d7ee4bbcfa
Making SafeBuffer << an alias for concat method
2010-02-19 13:37:19 -08:00
Jeremy Kemper
3926107aff
Use FileUtils.mv instead of rename to copy in case of cross-device links
2010-02-18 10:48:56 -08:00
Martin Andert
6227ec11f0
Fix error_messages_for i18n issue if object_name has underscores [ #3629 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-17 21:07:05 +01:00
Santiago Pastorino and José Ignacio Costa
4158282e32
simple_format returns a safe buffer escaping unsafe input [Santiago Pastorino] ( Closes #3767 )
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2010-02-12 17:25:11 -08:00
Gabriel Mansour
6451e864b9
Fix pluralization for numbers formatted like '1.00'
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-07 12:15:10 -08:00
Jeremy Kemper
84541c4997
Update CHANGELOG
2010-02-06 20:24:24 -08:00
Jeremy Kemper
6f9f1d3aef
Merge remote branch 'mikel/2-3-stable' into 2-3-stable
2010-02-06 20:19:21 -08:00
Mikel Lindsaar
1bf79f19a0
Reindended and handled old ruby syntax
2010-02-07 15:17:03 +11:00
Mikel Lindsaar
16b6d4216f
Fixed test to check using 8Bit and verified, removed stray require
2010-02-07 15:16:50 +11:00
Jeremy Kemper
f85ab90e4f
Ruby 1.9: cookie header parser works with either newline-delimited strings or arrays
2010-02-06 19:57:06 -08:00
Mikel Lindsaar
4645cd1499
Updating to TMail 1.2.7
2010-02-07 12:26:58 +11:00
Mikel Lindsaar
d53a590594
Fixing TMail encoding problem, porting to ActionMailer
2010-02-07 12:26:03 +11:00
Mikel Lindsaar
9a042baefb
Changing test, TMail now encodes this correctly
2010-02-07 12:25:30 +11:00
Mikel Lindsaar
696ec1f979
Changed version of TMail to 1.2.6
2010-02-06 15:00:43 +11:00
Santiago Pastorino and José Ignacio Costa
564ace6a01
Fixed html_safe test cases which weren't testing correctly backport from 3.0
...
[#3869 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-05 13:51:21 -08:00
Santiago Pastorino and José Ignacio Costa
8a0e8f0669
Tests for html_safe! backwards compatibility are restored
2010-02-05 19:06:23 -02:00
Jeremy Kemper
d5b4f4debf
Automatically prefer Yajl or JSON backend over Yaml, if available
2010-02-05 12:31:18 -08:00
Brian Lopez
83b4c161fc
Add yajl-ruby as a JSON parsing backend
...
[#2666 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-02-05 12:31:12 -08:00
Santiago Pastorino and José Ignacio Costa
55c1a86ea4
Added backwards compatibility for html_safe!
2010-02-05 18:19:42 -02:00
Santiago Pastorino and José Ignacio Costa
9ca6df83f6
Backport html_safe. Use latest rails_xss plugin for forward-compatibility with Rails 3.
2010-02-05 11:07:56 -08:00
Joshua Peek
0c0da1a6e0
Fix empty Set-Cookie headers [ #3811 state:resolved]
2010-02-02 08:53:16 -06:00
Matt Duncan
b362b394f6
Bump year in MIT licenses
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2010-02-02 08:47:10 -06:00
Jeremy Kemper
02e51500d5
Cherry-pick bd74060 from i18n master to fix broken string interpolation
2010-01-28 16:24:58 -08:00
Jatinder Singh
158e7b63ab
Use format of ARes rather than content-type of remote errors to load errors.
...
[#1956 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-27 18:27:55 -08:00
Geoff Buesing
3f7729a66e
Time#- with a DateTime argument behaves the same as with a Time argument, i.e. returns the difference between self and arg as a Float [ #3476 status:resolved]
2010-01-27 20:24:53 -06:00
snusnu
ce50c960c1
active_support/ordered_hash now requires yaml
2010-01-27 18:14:06 -08:00
Gregor Schmidt
57337cd74d
Adding custom yaml (de-)serialization for OrderedHash
...
[#3608 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-27 15:30:25 -08:00
Prem Sichanugrist
652bdeb3c3
Update vendored i18n gem to 0.3.3 [ #3492 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-21 09:45:43 +01:00
Prem Sichanugrist
ef10988fdd
Fix bug that causes to_utf_offset_s to returns wrong offset when hour < 0 and not in hundreds [ #3741 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-19 20:35:09 +01:00
Prem Sichanugrist
6012e575bb
Make local_request? to returns true when facing ::1 IPv6 address [ #3257 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-18 08:29:53 +01:00
José Valim
c50609c9f0
Merge remote branch 'eloy/2-3-stable' into 2-3-stable
2010-01-09 00:25:14 +01:00
David Heinemeier Hansson
94de32b6eb
Merge branch '2-3-stable' of github.com:rails/rails into 2-3-stable
2010-01-08 13:46:02 -08:00
David Heinemeier Hansson
4682035381
Fixed that PrototypeHelper#update_page should return html_safe [DHH]
2010-01-08 13:45:51 -08:00
Jeffrey Hardy
6e9b01fddb
Allow AR::Schema's migrations_path to be overwritten by subclasses. Defaults to 'db/migrate'
...
[#3671 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-08 13:09:50 -08:00
Eloy Duran
51e6124e6a
Renamed AssociationReflection #collection_association? to #collection?.
2010-01-08 21:44:06 +01:00
Eloy Duran
c9a3929a75
Rollback the transaction when one of the autosave associations fails to save. [ #3391 state:resolved]
2010-01-08 21:36:27 +01:00
Lawrence Pit
eb22c248de
Exclude unchanged records from the collection being considered for autosave. [ #2578 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2010-01-08 21:36:27 +01:00
Bryan Stearns
2aef092625
Add failing test that triggers the stack overflow for #2578 .
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2010-01-08 21:36:26 +01:00
David Heinemeier Hansson
d5ba7c3ea4
Fixed that much of DateHelper wouldn't return html_safe? strings [DHH]
2010-01-08 11:48:38 -08:00
David Heinemeier Hansson
45e192d05c
Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]
2010-01-07 17:39:32 -08:00
Eloy Duran
0dbe0f670e
Raise a RecordNotFound if an ID in nested attributes is given but doesn't return a record. [ #2415 state:resolved]
2010-01-07 13:20:43 +01:00
Eloy Duran
6d056c7175
Moved the validation logic to the association reflection and refactored autosave_association.rb a bit.
2010-01-07 13:20:43 +01:00
Eloy Duran
b3bd101796
Remove deprecated '_delete' option from NestedAttributes.
2010-01-07 13:20:42 +01:00
Eloy Duran
3d17d79bbf
Removed unnecessary call to #try and cleaned up a bit more.
2010-01-07 13:20:42 +01:00
Eloy Duran
4b7a439bd1
Don't use strings for callbacks, as these will be evaled. Rather use symbols, which uses a direct method dispatch.
...
Patch by Comron Sattari. [#3429 state:resolved]
2010-01-07 13:20:42 +01:00
Eloy Duran
c48a71c7e4
Cleanup some code in nested_attributes.rb, autosave_association.rb, and associations.rb with AssociationReflection#collection_association?
...
Also cache the result value.
2010-01-07 13:20:42 +01:00
Eloy Duran
f12dd62d47
Add AssociationReflection#collection_association? which returns true if it's for a has_many or has_and_belongs_to_many association.
2010-01-07 13:20:42 +01:00
Eloy Duran
e20ac99026
Refactored nested attributes a bit after last commit.
2010-01-07 13:20:42 +01:00
Mike Breen
69db137f89
Allows you to pass :all_blank to :reject_if option to automatically create a Proc that will reject any record with blank attributes.
...
[#2501 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2010-01-07 13:20:41 +01:00
José Valim
b7fd42626a
Use helpers.label instead of views.labels.
2010-01-07 02:28:10 +01:00
José Valim
319e4aa263
Make ActionPack specs work when I18n 0.3.3 is installed as gem.
2010-01-05 00:27:50 +01:00
Hongli Lai (Phusion)
1012dec88f
The failsafe middleware should flush the logger upon logging the error, otherwise nothing will be written to the log file.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-01-05 10:39:42 +13:00
Zach Brock
f32c96eb76
fixing autolinking other protocols
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3494 state:committed]
2010-01-05 10:39:12 +13:00
Stefan Penner
c362a76d00
Fixed multiparameter attribute assignment bug RE: Ticket 3131
...
http://rails.lighthouseapp.com/projects/8994/tickets/3131-multiparamter_attribute-assignment-fails-when-used-via-assoication
2010-01-02 23:48:09 -08:00
Stefan Penner
b3dd14adbe
Failing test case RE: Ticket 3131
...
http://rails.lighthouseapp.com/projects/8994/tickets/3131-multiparamter_attribute-assignment-fails-when-used-via-assoication
2010-01-02 23:48:08 -08:00
Carsten Gehling
f5714abc3d
I18n label helper [ #745 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-01-02 23:38:01 +01:00
Willem van Bergen
37c51594b9
Added two SAX-based backends for XmlMini, using both LibXML and Nokogiri.
...
[#3636 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-01 13:18:43 -08:00
Willem van Bergen
12f6fd0f26
Bugfixes, speed improvements and code cleanup for Nokogiri's and LibXML's XmlMini backend
...
[#3641 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-01-01 13:17:02 -08:00
Jeremy Kemper
54bc4852ea
Fix pg test
2009-12-28 13:05:44 -08:00
Eloy Duran
90f001ba39
Refactored previous changes to nested attributes.
2009-12-28 21:08:20 +01:00
Michael Siebert
7074c5a629
Add an :update_only option to accepts_nested_attributes_for for to-one associations. [ #2563 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 19:02:01 +01:00
Eloy Duran
146a750568
Make sure to not add autosave callbacks multiple times. [ #3575 state:resolved]
...
This makes sure that, in a HABTM association, only one join record is craeted.
2009-12-28 16:46:48 +01:00
Murray Steele
3470b306bb
Make polymorphic_inverse_of in Reflection throw an InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [ #3520 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 14:21:42 +01:00
Murray Steele
603b28c84c
Provide a slightly more robust we_can_set_the_inverse_on_this? method for polymorphic belongs_to associations. [ #3520 state:resolved]
...
Also add a new test for polymorphic belongs_to that test direct accessor assignment, not just .replace assignment.
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 14:21:18 +01:00
George Ogata
cca75ca23f
Add inverse polymorphic association support. [ #3520 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 14:20:58 +01:00
Murray Steele
592085be83
Add more tests for the various ways we can assign objects to associations. [ #3513 state:resolved]
...
Get rid of a duplicate set_inverse_instance call if you use new_record(true) (e.g. you want to replace the existing instance).
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 14:20:33 +01:00
George Ogata
ed5b89483a
Set inverse for #replace on a has_one association. [ #3513 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 14:18:46 +01:00
Frederick Cheung
ab09ffd41e
honour :inverse_of for joins based include
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 13:32:04 +01:00
Frederick Cheung
894c9b112c
honour inverse_of when preloading associations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-12-28 13:31:29 +01:00
David Heinemeier Hansson
1684aa113e
Fix tests
2009-12-27 15:23:51 -08:00
David Heinemeier Hansson
2675e4ef83
Translated strings in the view are assumed html_safe ( Closes #3401 )
2009-12-24 20:33:25 -08:00
Dwayne Litzenberger
a900205676
Fix ActiveSupport::JSON encoding of control characters [\x00-\x1f]
...
According to RFC 4627, only the following Unicode code points are
allowed unescaped in JSON:
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
However, ActiveSupport::JSON did not escape the range %x00-1f. This caused
parse errors when trying to decode the resulting output.
[#3345 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-23 11:46:25 -08:00
Murray Steele
5374fb3cad
Providing support for :inverse_of as an option to associations.
...
You can now add an :inverse_of option to has_one, has_many and belongs_to associations. This is best described with an example:
class Man < ActiveRecord::Base
has_one :face, :inverse_of => :man
end
class Face < ActiveRecord::Base
belongs_to :man, :inverse_of => :face
end
m = Man.first
f = m.face
Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance.
Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic.
Signed-off-by: Murray Steele <muz@h-lame.com >
Signed-off-by: Michael Koziarski <michael@koziarski.com >
Signed-off-by: José Valim <jose.valim@gmail.com >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
Conflicts:
activerecord/lib/active_record/associations/belongs_to_association.rb
activerecord/lib/active_record/associations/has_one_association.rb
2009-12-21 13:13:32 -08:00
David Heinemeier Hansson
8bb3b9bcff
Models with no attributes should just have empty hash fixtures [Sam] ( Closes #3563 )
2009-12-17 17:53:33 -08:00
David Heinemeier Hansson
e6cadd422b
Added :alert, :notice, and :flash as options to ActionController::Base#redirect_to that'll automatically set the proper flash before the redirection [DHH] Added ActionController::Base#notice/= and ActionController::Base#alert/= as a convenience accessors in both the controller and the view for flash[:notice]/= and flash[:alert]/= [DHH]
2009-12-17 11:34:47 -08:00
David Heinemeier Hansson
48cd7dfcf8
Fix the app generator of cookie_verification_secret.rb
2009-12-16 14:06:20 -08:00
José Valim
1c3711b21b
Fix another regression due to the inclusion of ActiveRecord::Error.
...
If a string is supplied to :default, it should not be used a
translation key (we already have :message for that).
[#3564 status:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-12-16 14:18:46 -06:00
Will
b1bbf90dff
When passing force_reload = true to an association, don't use the query cache [ #1827 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-12-16 10:49:40 -06:00
David Heinemeier Hansson
1229ef7bf3
Accessing nonexistant cookies through the signed jar should not raise an exception
2009-12-15 21:27:38 -08:00
David Heinemeier Hansson
6d1494cec6
Its cookie_verifier_secret
2009-12-15 21:03:57 -08:00
David Heinemeier Hansson
0200e20f14
Added cookies.permanent, cookies.signed, and cookies.permanent.signed accessor for common cookie actions [DHH]
2009-12-15 20:01:48 -08:00
Geoff Buesing
e4ebaab1cb
Add test for TimeWithZone#to_i with wrapped DateTime
2009-12-15 08:41:57 -06:00
Serguei Filimonov
754bbaaf37
Added #to_i to DateTime in ActiveSupport so #to_yaml works correctly on ActiveRecord models with DateTime attributes.
2009-12-15 08:34:02 -06:00
David Heinemeier Hansson
f039bbb13e
Dont be an ass and leave merge shit in stable, please
2009-12-14 18:07:37 -08:00
David Heinemeier Hansson
fda3ac6e68
Add Enumerable#exclude? to bring parity to Enumerable#include? and avoid if !x.include?/else calls [DHH]
2009-12-14 18:01:47 -08:00
John Pignata
1d9468b44e
Fix postgresql AR test failure
...
Due to the ordering of the returning result set, the test fails under the postgresql adapter. Order results by id prior to checking the first item
[#3542 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-11 15:15:37 -06:00
Jeremy Kemper
b9f352316e
Ruby 1.9.2: exclude to_str from explicit coercion check too
2009-12-06 16:54:53 -08:00
Jeremy Kemper
64082b350c
Ruby 1.9.2: explicitly raise NoMethodError for attempts at explicit coercion
2009-12-06 16:46:01 -08:00
Jeremy Kemper
b92ff78df6
Ruby 1.9: don't rely on . in load path
2009-12-06 15:34:13 -08:00
Gabe da Silveira
43d2cb8e93
Replace reset_counter_cache with reset_counters that has API inline with existing update_counters method
...
[#1211 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-03 23:25:41 -08:00
Ben Marini
ccb197b2e6
Add support for Mysql column positioning via #add_column and #change_column
...
add_column and change_column in the Mysql adapter now accept some
additional options:
:first => true # Put the column in front of all the columns
:after => column_name # Put the colmn after 'column_name'
add_column :new_col, :string, :first => true
add_column :another_col, :integer, :default => 0, :after => :new_col
[#3286 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-03 23:10:35 -08:00
Michael Koziarski
c253d7b2db
1.9 Fix for exception views.
2009-12-03 10:27:11 +13:00
Mat Brown
2f1ded3067
Fix instance_eval calls to association proxies
...
In the current stable, ActiveRecord::Associations::AssociationProxy#method_missing calls yield() if a block is given, causing the block to always be evaluated in its calling context. However, in the case of instance_eval, correct behavior requires that the block be passed directly to the @target, rather than being evaluated inside a different block. Incidentally, this also simplifies the code slightly.
[#3412 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-02 12:46:36 -08:00
Mike Breen
1db3a27961
Implement ActiveRecord#reset_counter_cache
...
[#1211 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-02 12:08:57 -08:00
Joey A
da61a6c967
avoid generating invalid SMTP commands in ruby pre 1.9
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-11-28 13:26:29 +13:00
Gabe da Silveira
bfe0328580
Make sure strip_tags removes tags which start with a non-printable character
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-11-27 10:04:22 +13:00
Eric Chapweske
3719bd3e95
Decode http_authentication creditentials without generating abitrary symbols.
2009-11-27 09:57:10 +13:00
Michael Koziarski
c7057a213d
Remove strange .diff file
2009-11-25 18:56:30 +13:00
Michael Koziarski
ec542caf58
Prepare for the 2.3.5 release
2009-11-25 18:56:12 +13:00
David Heinemeier Hansson
27b935dec6
Merge branch '2-3-stable' of github.com:rails/rails into 2-3-stable
2009-11-23 15:35:42 -06:00
David Heinemeier Hansson
d796fc638f
Fixed that the debugger wouldn't go into IRB mode because of left-over ARGVs [DHH]
2009-11-23 15:35:25 -06:00
Joshua Peek
0f0f977625
Revert "Prefix Internet Explorer's accepted mime types with sensible defaults."
...
IE XHR requests are misinterpreted as HTML instead of JS.
This reverts commit c680f2372e .
2009-11-23 11:19:39 -06:00
Jeremy Kemper
0bc150c884
Rails 3: move core_ext/blank to core_ext/object/blank for forward compatibility
2009-11-22 14:50:12 -08:00
Michael Koziarski
93085a7d6c
Handle a nil logger when generating Deprecation warnings
2009-11-19 14:22:36 +13:00
Jeremy Kemper
a942d66597
Extract form_authenticity_param instance method so it's overridable in subclasses
2009-11-17 23:36:48 -08:00
Gabe da Silveira
df0720b8b7
Insert generated association members in the same order they are specified when assigning to a has_many :through using the generated *_ids method
...
[#3491 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-17 22:24:53 -08:00
Jeremy Kemper
ed320cd896
Revert "Ensure Model#destroy respects optimistic locking"
...
Unresolved issues with :dependent => :destroy and counter caching.
[#1966 state:open]
This reverts commit 0d922885fb .
2009-11-17 15:31:02 -08:00
Will Read
88d2e4ca6f
Allow explicit placement of hidden id element for nested models.
...
[#3259 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-11-15 21:50:35 +01:00
Jeremy Kemper
6da0365383
Loosen i18n gem deps from ~> to >=
2009-11-14 03:33:12 -08:00
Jeremy Kemper
78f5ecf02f
CI: test AR + sqlite 2 on 1.8 only
2009-11-13 23:32:32 -08:00
Jeremy Kemper
6950f0cef2
Typo
2009-11-13 19:40:59 -08:00
Jeremy Kemper
4c3477ce77
Ruby 1.9: skip fcgi handler tests
2009-11-13 19:27:01 -08:00
Jeremy Kemper
4ffe2e171a
CI: upgrade mysql, mocha, sqlite3-ruby
2009-11-13 18:44:07 -08:00
Jeremy Kemper
90f3272f1d
Remove weird zombie test
2009-11-13 18:16:11 -08:00
Jeremy Kemper
c27cb5e1d4
Ruby 1.9: remove dep on T::U::AssertionFailedError
2009-11-13 18:05:14 -08:00
Jeremy Kemper
9abab5ba02
Test railties earlier rather than having to wait through AR
2009-11-13 13:15:03 -08:00
Jeremy Kemper
61bb491cbe
Ruby 1.9.2: use super rather than raise our own NoMethodError to work around to_ary issues
2009-11-13 13:03:10 -08:00
Jeremy Kemper
3fa8ca5845
Ruby 1.9.2: StringIO no longer has #path
2009-11-13 13:02:29 -08:00
Jeremy Kemper
2d67ef9416
Ruby 1.9.2: prefer Array.wrap to [foo].flatten
2009-11-13 12:59:16 -08:00
Jeremy Kemper
f62a8831fe
test-unit 2: filter_backtrace is private
2009-11-13 12:47:07 -08:00
Jeremy Kemper
3a3dfe4996
Ruby 1.9.2: fix broken to_ary expectation
2009-11-13 12:42:40 -08:00
Jeremy Kemper
de0384008c
Ruby 1.9.2: disallow explicit coercion via method_missing. Only give friendly nil errors for Array and Active Record methods.
2009-11-13 12:28:37 -08:00
David Vrensk
4bc58a215f
Rdoc for changes introduced in 6339e5d36, 542d6a0abd.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-12 11:20:34 -08:00
José Valim
a4540128a4
[PATCH] Optimize Error I18n to avoid unecessary lookups and just retrieve values when needed [ #3477 status:resolved].
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-11-10 12:26:33 -06:00
Matt Jones
6c0028d5cc
delete correct records for a has_many with :primary_key and :dependent => :delete_all
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-11-10 18:07:04 +13:00
Bryan Helmkamp
22e1f4b307
Silence warning: instance variable @selected not initialized
2009-11-09 17:24:18 -05:00
Bryan Helmkamp
b45d44cff0
Silence warning: ambiguous first argument; put parentheses or even spaces
2009-11-09 17:24:13 -05:00
Bryan Helmkamp
40f0ef7a37
Silence warning: instance variable @segment not initialized
2009-11-09 17:24:09 -05:00
Bryan Helmkamp
ea345a540f
Silence warning: instance variable @integration_session not initialized
2009-11-09 17:24:03 -05:00
Bryan Helmkamp
ae5e2f5919
Silence warning: instance variable @auto_index not initialized
2009-11-09 17:23:59 -05:00
Bryan Helmkamp
8073e47262
Silence warning: instance variable @explicit_view_paths not initialized
2009-11-09 17:23:55 -05:00
Bryan Helmkamp
a0d28dcfd4
Silence warning: instance variable @real_format not initialized
2009-11-09 17:23:50 -05:00
Bryan Helmkamp
17fda24523
Silence warning: instance variable @controller not initialized
2009-11-09 17:23:37 -05:00
Bryan Helmkamp
a3ab2b0ee1
Silence warning: instance variable @session not initialized
2009-11-09 17:23:30 -05:00
Jeremy Kemper
bfb931b865
Bump CI rack to 1.0.1
2009-11-09 12:43:10 -08:00
Jeremy Kemper
97a7cdca17
Merge commit 'brynary/2-3-stable' into 2-3-stable
2009-11-09 12:26:21 -08:00
Bryan Helmkamp
b68861a00f
Silence warning: method redefined; discarding old template
2009-11-09 15:15:09 -05:00
Bryan Helmkamp
2ccd4e790e
Silence warning: method redefined; discarding old filename
2009-11-09 15:14:18 -05:00
Bryan Helmkamp
8820bb7eff
Silence warning: discarding old h
2009-11-09 15:12:33 -05:00
Jeremy Kemper
fd0289f3dd
Bump Rack to 1.0.1. Ensure integration test input is ASCII.
2009-11-09 11:21:12 -08:00
Jeremy Kemper
a3e129f79b
Shush
2009-11-09 10:36:31 -08:00
Jeremy Kemper
d81c606fba
Work around Float faux precision
2009-11-09 10:34:16 -08:00
Jeremy Kemper
9ea850027c
Ruby 1.9 doesn't recognize EM SPACE as whitespace, breaking String#strip
2009-11-09 10:26:28 -08:00
Bryan Helmkamp
d988507dca
Fix Ruby warning: method redefined; discarding old breakpoint
2009-11-09 12:57:04 -05:00
Bryan Helmkamp
6fdd60e65c
Fix Ruby warning: instance variable @loaded not initialized
2009-11-09 12:57:04 -05:00
Bryan Helmkamp
1a93e93d1b
Fix some Ruby warnings: `*' interpreted as argument prefix
2009-11-09 12:57:04 -05:00
Chris Hapgood
d36f8a2bf2
Share ActionView::TestCase's output_buffer with view for concat support.
...
[#3467 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-11-07 00:15:11 +01:00
Chris Hapgood
df9a47e4b8
Make some assertions in the ActionView::TestCase tests actually do something.
...
[#3468 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-11-06 23:59:45 +01:00
Eloy Duran
6b2291f330
Define autosave association callbacks when using accepts_nested_attributes_for.
...
This way we don't define all the validation methods for all associations by
default, but only when needed.
[#3355 state:resolved]
2009-11-06 23:53:33 +01:00
Chris Hapgood
c3ef028b81
Fix OrderedHash#replace
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-11-05 21:16:06 +13:00
Matias Flores
4ae03b2d5a
Fix chars.reverse for multibyte decomposed strings
...
[#597 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-02 17:59:40 -08:00
José Valim
7ba80252a5
Make polymorphic_url work with symbols again and refactor it [ #1384 status:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-28 14:15:16 -05:00
José Valim
f5f7c40f3a
Fix nested attributes error messages which is broken in 2.3.4. It still copies the message from child to parent, but does the lookup in the child, not in the parent, avoiding error messages duplication (as happened in 2.3.3). [ #3147 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-28 13:44:24 -05:00
Yehuda Katz
fdf356d74b
Fixed HTTP digest to properly return 401 when the Authorization header has no nonce specified, or the Authorization header specifies Basic auth [ #2968 state:resolved]
2009-10-21 12:04:59 -07:00
Mike Gunderloy
9edfdef2a7
Fix bad assumption in BacktraceCleaner test [ #3249 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-10-18 17:23:28 -02:00
Travis Briggs
eb30c69544
Ensure number_to_human_size does not strip zeros from the end [ #1763 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-10-17 13:37:46 +13:00
Michael Koziarski
459749c30c
Backport the xss_safe? method for plugin authors targetting 2.3 and master
2009-10-15 17:19:24 +13:00
George Ogata
e10b0ddc7b
Make IntegrationTest::Runner propagate method_missing to ancestors.
...
Fixes RSpec integration example groups, which mixes its Matchers
module into ActiveSupport::TestCase.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-15 11:02:02 +13:00
Jeffrey Hardy
bbaf3a04f5
CookieJar#delete should return the key's value, consistent with a Hash
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-14 11:51:11 -07:00
Jeremy Kemper
7454d1874c
Mark html safety
2009-10-09 18:37:38 -07:00
Pratik Naik
c23706b787
Add a :limit option to specify the maximum number of records that can be processed by accepts_nested_attributes_for
...
Conflicts:
activerecord/lib/active_record/nested_attributes.rb
2009-10-09 16:11:22 +01:00
Pratik Naik
4010b49de8
Store entire options hash in the class var rather than just the reject_if proc for the nested attributes
...
Conflicts:
activerecord/lib/active_record/nested_attributes.rb
activerecord/test/cases/nested_attributes_test.rb
2009-10-09 15:47:31 +01:00
Pratik Naik
c47c5af1c8
Mute log info coming from the local_cache strategy
2009-10-09 15:12:01 +01:00
Pratik Naik
48b30608a4
Ensure MessageVerifier raises appropriate exception on tampered data
2009-10-09 02:26:37 +01:00
Michael Koziarski
95b7e4f7d7
field_error_proc needs to return a safe string
2009-10-08 14:02:12 +13:00
Michael Koziarski
80da8eb43d
Merge the prerequisites for on-by-default XSS escaping into rails.
...
This consists of:
* String#html_safe! a method to mark a string as 'safe'
* ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it
* Calls to String#html_safe! throughout the rails helpers
* a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB)
Note, this does *not* give you on-by-default XSS escaping in 2.3 applications. To get that you'll need to install a plugin:
http://github.com/nzkoz/rails_xss
2009-10-08 13:59:21 +13:00
Pratik Naik
a69316b293
Use indifferent access attributes instead of stringifying them
2009-10-08 00:14:52 +01:00
Pratik Naik
e2127991a1
Allow accepts_nested_attributes_for :reject_if option accept symbols for using a method
2009-10-07 23:45:40 +01:00
pivotal
6f2c4991ef
Explicitly require ActionController's CGI extensions so they're properly loaded before the first request.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-08 09:56:23 +13:00
Bryan Helmkamp
0f14d7b6d3
Only load rake tasks from tasks/**/*.rake and lib/tasks/**/*.rake in plugins
...
Previously, it was **/tasks/**/*.rake, and that loaded some paths that shouldn't be like:
* vendor/plugins/admin_assistant/test_rails_app/lib/tasks/rspec.rake
* vendor/plugins/will_paginate/test/tasks.rake
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-08 09:53:33 +13:00
Jesse Proudman
58f14438a9
Running rake dev leaves ERB in environment.rb. The existing Rake task was just copying the file across. This patch modifies the Rake task to use the same ERB processing string used on database.yml, which cleans up the environment.rb file.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-07 08:44:59 +13:00
Pratik Naik
91b61a8d16
Monkey patch Rack::Lint to allow string subclass body
2009-10-06 15:55:56 +01:00
Jeffrey Hardy
f98302e46b
MessageVerifier#verify raises InvalidSignature if the signature is blank
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-05 13:39:10 -07:00
Joshua Peek
11cce5bde9
Coerce all out going body parts to Strings
2009-10-05 14:21:57 -05:00
Bryan Helmkamp
1d7412b135
Reduce specificity of logging test to avoid dependency on the system clock
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-29 17:10:01 -07:00
Chad Woolley
1901747001
reduce max size of fixture IDs to fix sqlite2 tests, because sqlite2 was getting negative and changing values for ID field. See http://www.sqlite.org/datatypes.html
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-29 02:53:45 -07:00
Chad Woolley
f95a7f896e
make mysql and postgresql rebuild databases on every CI build, to prevent breakages such as collation and character set changing
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-27 21:57:41 -07:00
Yehuda Katz
26f22a28e9
Merge branch '2-3-stable' of git@github.com:rails/rails into 2-3-stable
2009-09-27 21:57:30 -07:00
John Trupiano
f489b3341c
Introduce :almost keyword for distance_of_time_in_words. Make 1.75 days - 2 days return '2 days'.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3266 state:committed]
2009-09-28 14:56:19 +13:00
Jay Pignata
b372b4c875
Enhancing distance_of_time_in_words to prefix year output with over and about depending upon how many months have elapsed
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3106 state:committed]
2009-09-28 14:56:14 +13:00
Luciano G Panaro
14a6794a8e
Make has_one with :conditions hash scope build or creation of the associated object with those conditions
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3088 state:committed]
2009-09-28 14:51:14 +13:00
Gaspard Bucher
8371d6f0c1
Fixes a bug where layouts provided with an absolute path would not be found because they were prefixed by 'layouts'. This bug only appears if the path does not contain the word 'layouts'.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3207 state:committed]
2009-09-28 14:40:21 +13:00
Chad Woolley
4a11ca1c7e
include nokogiri gem, so activesupport nokogiri tests run
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-26 12:23:18 -05:00
Eloy Duran
b18248ff05
The DomAssertions now also strip surrounding whitespace inside tags.
2009-09-25 17:46:21 +02:00
Eloy Duran
deac481eb7
Made assert_dom_equal and assert_dom_not_equal ignore meaningless whitespace.
...
Also changed message of assert_dom_equal to be like assert_equal.
2009-09-25 17:05:30 +02:00
Eloy Duran
cddd4746f9
Rewrote ActionView::TestCase.
...
The test case now mimicks the template environment more closely, so it's
possible to use render, load helper dependencies.
This also fixes assert_select, and similar assertions. Because view tests
and helpers generally don't render full templates assert_select looks
first in rendered and then in output_buffer to find the rendered output.
2009-09-25 15:51:27 +02:00
Manfred Stienstra
c680f2372e
Prefix Internet Explorer's accepted mime types with sensible defaults.
2009-09-25 15:47:33 +02:00
Michael Gunderloy
6222ac1a91
Fix variable error in Nokogiri XmlMini code [ #3242 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-09-22 00:23:59 +01:00
Aaron Patterson
e18752868a
making nokogiri to hash less clever, more fast O_o
...
[#2243 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 11:53:09 -07:00
Jeremy Kemper
1488c6cc9e
Fix brittle content-type check. [ #1956 state:committed]
2009-09-17 11:39:59 -07:00
Justin Bailey
4f5cac53b7
Enable use of MySQL stored procedures by default.
...
[#3204 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 10:59:41 -07:00
Developer
179b4512d1
Allow Nokogiri XmlMini backend to process cdata elements
...
[#3219 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 10:30:08 -07:00
Jeremy Kemper
ff0377dea5
Fix failing dependencies test relying on . being in LOAD_PATH
2009-09-13 05:44:16 -07:00
Jeremy Kemper
f503a483d4
Extract repetitive method
2009-09-13 05:44:09 -07:00
Jeremy Kemper
abd7bd311a
Clean up spurious JSON decoding test failure
2009-09-13 05:43:10 -07:00
Jeremy Kemper
09b197f957
Ruby 1.9 compat: fix regexp slice test
2009-09-13 05:30:59 -07:00
Jeremy Kemper
c6fe042b29
Ruby 1.9: fix Time#beginning_of_day inaccuracy due to subtracting a Float
2009-09-13 05:07:21 -07:00
Jeremy Kemper
8dca666ba1
Silence warning for Encoding.default_external=
2009-09-13 04:49:08 -07:00
Jeremy Kemper
477dfa4c79
Use Encoding.default_external, not _internal
2009-09-13 04:49:02 -07:00
sdsykes
8afeec20e0
Ruby 1.9 compat: corrected instance_methods check
...
[#3156 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-13 02:58:36 -07:00
Michael Koziarski
6ddb7de407
Dup the arguments to string compare so we can use force_encoding.
...
Conflicts:
activesupport/lib/active_support/message_verifier.rb
2009-09-13 10:37:41 +12:00
Eloy Duran
2524ac84e6
Removed some superfluous conditionals from the autosave association validation methods.
...
Which are unneeded now that we only define them when needed.
2009-09-12 15:03:05 +02:00
Alexey Kovyrin
c0245493cb
Define autosave association validation methods only when needed. [ #3161 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 14:55:34 +02:00
Eloy Duran
9290051b85
Added some documentation about setting :autosave => false on an association.
2009-09-12 13:43:17 +02:00
Eloy Duran
c665faac09
During autosave, ignore records that already have been destroyed. [ #2537 state:resolved]
2009-09-12 13:43:17 +02:00
Graeme Porteous
a070873771
Fix has_one with foreign_key and primary_key association bug which caused the associated object being lost when saving the owner. [ #1756 state:resolved]
...
Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 13:43:16 +02:00
José Valim
11c338735c
Rename nested attributes _delete to _destroy to reflect its actual behavior and DSL (:allow_destroy). Deprecation warning added. [ #2889 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 13:36:42 +02:00
Dmitry Polushkin
c52a50ec51
Fix autosave association to skip validation if it is marked for destruction. [ #2064 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 13:36:42 +02:00
Eloy Duran
2420d6272c
Explicitely setting `autosave => false' should override new_record autosaving. [ #2214 state:resolved]
...
Original author is Jacob.
2009-09-12 13:23:05 +02:00
Andrew France
55bc0c76f8
Allow fields_for on a nested_attributes association to accept an explicit collection to be used. [ #2648 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 13:16:30 +02:00
Lance Ivy
7c1e4ef64b
Don't cascade autosave validation to destroyed children. [ #2761 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 13:16:30 +02:00
Mike Breen
52a50db6c0
Raise an exception with friendlier error message when attempting to build a polymorphic belongs_to with accepts_nested_attributes_for. [ #2318 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 13:16:30 +02:00
sdsykes
d48d3d0f41
Fix habtm associations when using multiple databases
...
[#3128 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-12 02:55:33 -07:00
Jeremy Kemper
3f59a73cb6
activesupport -> active_support
2009-09-12 02:47:25 -07:00
Jeremy Kemper
08d15f86c4
Deprecate "Allow frameworks to be required by their gem name"
...
This has just been confusing. Better to educate than band-aid.
This deprecates commit 18a24274ec .
Originally from http://dev.rubyonrails.org/ticket/8845 [drnic]
2009-09-12 02:45:33 -07:00
Akira Matsuda
c5e3309bb4
Ruby 1.9 compat: Avoid using the return value of FileUtils.mkdir_p, as it does not return a String but an Array in Ruby 1.9
...
[#2018 state:committed milestone:2.3.5]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-11 19:21:31 -07:00
Akira Matsuda
44fbc86ab8
Ensure validation errors to be ordered in declared order
...
[#2301 state:committed milestone:2.3.5]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-11 18:37:32 -07:00
Akira Matsuda
596406f90a
Fix default_error_messages back to the original message
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-11 18:31:28 -07:00
Akira Matsuda
3413643e83
1.9 compat: let -c option work with Ruby 1.9
...
[#3109 state:committed milestone:2.3.5]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-11 18:06:51 -07:00
Akira Matsuda
028d449fe9
1.9 compat: let -g option work with Ruby 1.9
...
[#3105 state:committed milestone:2.3.5]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-11 18:06:51 -07:00
Jakub Kuźma
5de75398c4
ruby 1.9 friendly secure_compare
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-09-12 12:47:53 +12:00
Shugo Maeda
d2cf33e903
Removed the copyright notice not to show it in the result of 'ri ActiveRecord'.
2009-09-11 15:18:08 -07:00
Nathaniel Talbott
ab9efe9e16
Fix filtering parameters when there are Fixnum or other un-dupable values.
...
[#3184 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-10 18:52:45 -07:00
Beau Harrington
a32eeebdcb
Remove redundant checks for valid character regexp in ActiveSupport::Multibyte#clean and #verify.
...
[#3181 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-10 17:37:16 -07:00
José Valim
e1b109633c
Allow scope to be changed for ActiveRecord::Errors#generate_full_message and change deprecation message [ #1687 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-08 10:38:45 -05:00
Jeremy Kemper
8a2cfe9de4
Ruby 1.9: fix MessageVerifier#secure_compare
2009-09-08 14:06:35 +09:00
Michael Koziarski
a43ef2436c
Prepare for 2.3.4 release
2009-09-04 09:56:09 +12:00
Michael Koziarski
9a68c72b4b
Clean tag attributes before passing through the escape_once logic.
...
Addresses CVE-2009-3009
2009-09-04 09:26:13 +12:00
Manfred Stienstra
07c69380cf
Add verify and clean methods to ActiveSupport::Multibyte.
...
When accepting character input from outside of your application you can't
blindly trust that all strings are properly encoded. With these methods
you can check incoming strings and clean them up if necessary.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-09-04 09:26:13 +12:00
Coda Hale
1f07a89c59
Fix timing attack vulnerability in ActiveSupport::MessageVerifier.
...
Use a constant-time comparison algorithm to compare the candidate HMAC with the calculated HMAC to prevent leaking information about the calculated HMAC.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-09-04 09:26:13 +12:00
Jeremy Kemper
2b82708b0e
Revert "Assert primary key does not exist in habtm when the association is defined, instead of doing that everytime a record is inserted."
...
Test failures on PostgreSQL.
[#3128 ]
This reverts commit 594a281d66 .
2009-09-02 13:57:33 -07:00
José Valim
594a281d66
Assert primary key does not exist in habtm when the association is defined, instead of doing that everytime a record is inserted.
...
[#3128 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-01 10:18:47 -07:00
Geoff Buesing
6bf17770af
Rails::Info doesn't require version for unwanted frameworks
...
[#3124 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-01 02:29:46 -07:00
Joshua Peek
6fdfe4cb5f
Deprecated "best fit" detection is to difficult. Just provide a switch to toggle the new behavor on.
...
# new_rails_defaults.rb
ActionController::Routing.generate_best_match = false
2009-08-31 16:09:47 -05:00
Jay Pignata
49c4a79e59
Duplicating the options hash in Date#advance to prevent modification of the original [ #1133 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-31 13:01:34 -05:00
Antonio Tapiador del Dujo
49342d1745
I18n support for plugins
...
Rails will now automatically add locale files found in any engine's locale
directory to the I18n.load_path (i.e. files that match the glob pattern
"config/locales/**/*.{rb,yml}" relative to engine directories).
[#2325 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-30 13:38:10 -07:00
Jay Pignata
ff8cb50f25
Ensuring that a singular model name is set for use in controllers when scaffold is passed a plural model name
...
[#3062 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-30 13:31:16 -07:00
Chad Woolley
70ed47f5b4
CI config updates: do not send CI emails unless explicitly enabled, use 'gem update --system', and send emails from an address which can post to the core list
...
[#3116 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-30 00:06:39 -07:00
Sven Fuchs + Mateo Murphy
13fb26b714
Fix ActiveRecord Error message I18n:
...
* allow messages and full_messages to be lazily translated at any time
* allow locales to be swapped and still obtain correctly localized messages
* allow localized global and error-type specific full_message formats
* extract an Error class
[#1687 state:open]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-29 09:48:16 -07:00
Jeremy Kemper
05d7409ae5
Prefer utf8_unicode_ci (better) over utf8_general_ci (faster)
2009-08-27 23:09:21 -07:00
Jeffrey Hardy
058459dc22
When running multiple test tasks, don't abort early if one produces failures
...
[#3107 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-27 11:17:25 -07:00
Jeffrey Hardy
8a49183563
Don't use AR::Base.connection for fixture column quoting. Use the connection given to Fixtures.new
...
[#3104 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 14:53:32 -07:00
Jeffrey Hardy
4240890b28
UrlRewriter#rewrite_url should call #to_param on the value given in :anchor option, just as #url_for does
...
[#2746 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 14:11:39 -07:00
Akira Matsuda
e46e67c71f
I18n: use I18n for select helpers' prompt text
...
[#2252 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 13:56:15 -07:00
Jeremy Kemper
3cd245b7fa
Revert "I18n: use I18n for select helpers' prompt text"
...
Broke CI.
[#2252 state:open]
This reverts commit d725ad39da .
2009-08-26 12:12:04 -07:00
Sven Fuchs
a4838ee466
allow ActiveRecord#RecordInvalid exception message to be localized
...
[#2754 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 11:23:30 -07:00
Akira Matsuda
d725ad39da
I18n: use I18n for select helpers' prompt text
...
[#2252 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 09:39:01 -07:00
Jeremy Kemper
e213f0caaa
Fix typo
2009-08-25 13:43:20 -07:00
Emilio Tagua
38d6e65c5a
timestamps gives a created_at field not created_on.
...
[#3093 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-25 13:43:14 -07:00
Jeremy Kemper
f1355e6a4d
Benchmark script via miloops' arel fork via DataMapper's AR comparison script
2009-08-25 13:43:03 -07:00
Jeremy Kemper
d6a944f778
Add active_support/all for forward compatibility.
2009-08-23 17:18:23 -07:00
Mike Gunderloy
9127c5b7f5
Fix trivial typo in template runner example [ #3082 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-20 13:35:21 +01:00
Yehuda Katz
5f6e788e27
Removes examples so it can be replaced with separate repo
2009-08-18 11:15:31 -07:00
David Heinemeier Hansson
f3c7bbeedd
Added db/seeds.rb as a default file for storing seed data for the database. Can be loaded with rake db:seed (or created alongside the db with db:setup). (This is also known as the "Stop Putting Gawd Damn Seed Data In Your Migrations" feature) [DHH]
...
Conflicts:
railties/CHANGELOG
2009-08-18 16:08:50 +01:00
Pratik Naik
b9f668ea94
Deprecate SQLite2Adapter and DeprecatedSQLiteAdapter
2009-08-17 14:49:31 +01:00
Jeremy Kemper
d8ae3d5a8b
2-3-stable CI notifies rails core list
2009-08-15 20:31:02 -07:00
Jeremy Kemper
1cb433ce78
Bump pg gem requirement to 0.8.0. Build psql db with UTF8 encoding.
2009-08-15 19:04:16 -07:00
Hongli Lai (Phusion)
14b6ab0f01
Fix reloading of metal pieces.
...
- Do not hold references to old metal objects after metal classes have been reloaded.
- Obtain the reloader lock before building the middleware stack, so that reloading of metal pieces works in the face of multithreading.
[#2873 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-15 18:00:49 -07:00
Jay Pignata
1cf32ad35a
Adding a call to logger from params_parser to give detailed debug information when invalid xml or json is posted
...
[#2481 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-15 16:46:43 -07:00
Jeremy Kemper
75a483e18e
Normalize route generation order: associations, yield block, then own routes.
2009-08-15 15:58:20 -07:00
Jeremy Kemper
061b0ba6cb
Refine the deprecated route check to explicitly check whether the future route pick comes before the deprecated route that was found.
2009-08-15 15:53:45 -07:00
Jatinder Singh
dbc62ad225
Fix ActiveResource load test for 64bit machines [ #3051 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-15 19:57:22 +01:00
Jay Pignata
a249cad5ef
Fix calculation tests on sqlite2 [ #3053 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-15 19:52:08 +01:00
Jay Pignata
dad0f62dc9
Fix test_has_many_through_polymorphic_has_one on sqlite2 [ #3054 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-15 19:27:35 +01:00
Jeremy Kemper
6f5d1f3190
'would of' => 'will be'
2009-08-11 01:25:15 -05:00
Bryan Helmkamp
e82b43599e
Allow delegating to nil, because the method might actually exist on it
2009-08-10 18:49:37 -05:00
Hongli Lai (Phusion)
a91969803e
Correctly unlock the reloader lock if the underlying app raises an exception.
...
[#2873 state:incomplete]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-10 16:18:35 -05:00
Kamal Fariz Mahyuddin
9284bcc35a
find_cmd should return the full path of the db command
...
[#1488 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-10 00:04:51 -07:00
codeape
9a42096e95
Introduce grouped_collection_select helper.
...
[#1249 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-10 00:00:02 -07:00
Erik Ostrom
4e014379a3
Correctly handle offsets in Multibyte::Chars#index and #rindex.
...
The offset in codepoints was being passed directly to the wrapped string's index/rindex method. Now we translate the offset into bytes first.
[#3028 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 23:32:08 -07:00
Cristi Balan
25fe43bc14
Add tests for scoping schema_migrations index by global table prefix and suffix
...
[#1543 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:58:35 -07:00
Tim Peters
9e96f37edd
Use table prefix and suffix for schema_migrations index.
...
[#1543 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:57:37 -07:00
Fabien Jakimowicz
c3da22c042
Add support for errors in JSON format.
...
[#1956 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:41:56 -07:00
Daniel Sheppard
9341655fa3
Fix that JSON parser fails to read escaped backslashes.
...
[#973 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:32:13 -07:00
Leonardo Borges
5c74cffae6
PostgreSQL: XML datatype support
...
[#1874 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:26:26 -07:00
Jaime Bellmyer
9d51f62866
raises an exception on habtm join table inserts if join table contains a primary key. Caches this check to save time on subsequent inserts.
...
[#2086 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:20:02 -07:00
Jaime Bellmyer
9a3a7983c3
raises exception (ActiveRecord::ConfigurationError with message) on habtm association creation if join table contains a primary key
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 22:19:56 -07:00
José Valim
e972acc0d7
Allow radio buttons to work with booleans.
...
[#2937 state:committed]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 22:15:35 -07:00
Morgan Schweers
d0bdff0799
Fix that creating a table whose primary key prefix type is :table_name generates an incorrectly pluralized primary key.
...
[#872 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 21:59:08 -07:00
Jeremy Kemper
011baa0f65
Fix test dependency on taggings
2009-08-09 21:31:22 -07:00
Gabe da Silveira
9bc80f4dd1
Fix that counter_cache breaks with has_many :dependent => :nullify.
...
[#1196 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 21:31:13 -07:00
Jatinder Singh
8a49af3158
AR should respect default values for MySQL BINARY and VARBINARY columns.
...
[#1273 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 21:05:29 -07:00
Joshua Peek
ff643ce967
Deprecate router generation "best match" sorting
2009-08-09 22:52:14 -05:00
Joshua Nichols
ebb6606a4d
Only load db/schema.rb if it exists; otherwise, display a message to run db:migrate or remove active_record in environment.rb.
...
[#3012 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 20:19:31 -07:00
Joshua Nichols
15fd67e9d8
Backported XML serialization behavior from master for dealing with root nodes that have modules.
...
ie,
- the root node is dasherized, such that MyApplication::Business::Project becomes <my-application-project-business-project>
- association children nodes have type attributes, such that MyApplication::Business::Developer becomes <developer type="MyApplication::Project::Developer">
[#2723 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 20:13:42 -07:00
Dan Croak
33c054d7e0
has_many :through create should not raise validation errors
...
[#2934 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 18:47:25 -07:00
jeem
cc3183d4be
make private_and_public_methods unmemoizable [ #2372 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-08-09 20:04:15 -05:00
Max Lapshin
9e29c084eb
Make sure link_to generates the form with the specified :href if any [ #2254 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 01:00:07 +01:00
Visnu Pitiyanuvath
ecc9b705d7
Allow ho:through#build when the owner is a new record [ #1749 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 00:49:51 +01:00
Tristan Dunn
491f1b5f36
Prevent overwriting of table name in merging SQL conditions [ #2949 state:resolved]
2009-08-10 00:41:53 +01:00
Gabe da Silveira
b763858ed5
Enable has_many :through for going through a has_one association on the join model [ #2719 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 00:34:32 +01:00
Arthur Zapparoli
9bcacf4962
Removed duplicated tests [ #3026 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 00:08:50 +01:00
Arthur Zapparoli
18b4ac6992
Model#human_attribute_name now accept symbols [ #3025 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 23:56:18 +01:00
Matt Duncan
ba961250bd
Fixed to_label_tag to accept id attribute without changing for attribute [ #2660 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 23:56:06 +01:00
Grzegorz Forysinski
59c3b0d0de
Ensure ActiveResource#load works with numeric arrays [Grzegorz Forysinski, Elad Meidar]
...
[#2305 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 23:40:06 +01:00
Jordan Brough
be017fd7d5
Active Resource recognizes 410 as Resource Gone now [ #2316 state:resolved] [Jordan Brough, Jatinder Singh]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
Conflicts:
activeresource/lib/active_resource/exceptions.rb
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 23:33:11 +01:00
Vladimir Meremyanin
93f5d9d5f0
Make sure association conditions work with :include and :joins [ #358 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 23:10:34 +01:00
Tristan Dunn
7908cfabf7
No longer require database name for MySQL to allow cross database selects.
...
[#1122 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:36:51 -07:00
Hugo Peixoto
39de15f136
Added both the documentation and a test case for the collection path name customization feature.
...
[#1218 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:27:04 -07:00
Bence Nagy
250e718355
path_names could be used to customize collection actions too
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:27:04 -07:00
Jatinder Singh
323f58f19f
Make ActiveResource#exists? work [ #3020 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 22:25:20 +01:00
Joshua Nichols
29a5549b34
Added back support for destroying an association's object by id. [ #2306 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 21:47:06 +01:00
David Burger
c9d4bcf163
Fix that Hash#to_xml and Array#to_xml shouldn't modify their options hashes [ #672 state:resolved] [David Burger, Dana Jones]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 21:47:06 +01:00
Hugo Peixoto
2c4f4a8734
With multiparameter date attributes, the behaviour when empty fields are present is now coherent with the one described in the date_select documentation.
...
[#1715 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 13:39:31 -07:00
Roy Nicholson
de0b073f3e
Add ability to set SSL options on ARes connections.
...
[#2370 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 13:23:48 -07:00
Elise Huard
f6f04f1549
validate uniqueness with limit in utf8
...
[#2653 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 12:53:09 -07:00
Hugo Peixoto
a8286af3c3
Added a uniqueness validation test that uses diacritics.
...
[#2883 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 11:56:16 -07:00
Jeremy Kemper
d44b5c6219
Fix that RedCloth shouldn't be required to run tests
2009-08-09 11:02:45 -07:00
Simon Jefford
c41fb5865f
Add test for routes_for_controller_and_action deprecation [ #3023 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 18:26:22 +01:00
Dan Croak
8058a1d7d7
Deprecation warning for routes_for_controller_and_action. Use routes_for instead. [ #3023 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 18:01:54 +01:00
Matt Conway
d3a802cee0
Allow connect_timeout, read_timeout and write_timeout settings for MySQL [ #2544 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 17:15:40 +01:00
railsbob
80d8608102
Ensure hm:t#find does not assign nil to :include [ #1845 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 17:03:38 +01:00
rizwanreza
d1202cfeb2
Support passing Redcloth options via textilize helper [ #2973 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:42:50 +01:00
Mike Breen
8056c57a94
Serialized attributes should only be saved with partial_updates when the serialized attribute is present [ #2397 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:36:54 +01:00
Hugo Peixoto
5e4b946927
Fixed the end_of_* to work with Time.usec (and Time.nsec in ruby1.9) [ #1225 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 16:11:55 +01:00
Hugo Peixoto
5f6623b1b4
added tests for namespaced models generation and fixed a bug related to it. Also fixed a pluralization=false issue.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 16:11:42 +01:00
Michael Siebert
4c96030d05
Fix deprecating =-methods by using send [ #2431 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 16:11:36 +01:00
José Valim
2d2216fadb
Make http digest work with different server/browser combinations. [ #3006 status:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:11:27 +01:00
Dmitry Ratnikov
32c23552f5
Changed to use klass instead of constantizing in assign_ids generated method
...
[#260 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 02:51:39 -07:00
Jeremy Kemper
83cc7de2a4
Setting connection timeout also affects Net::HTTP open_timeout.
...
[#2947 state:resolved]
2009-08-09 02:28:27 -07:00
Yehuda Katz
ee8fe3ae4e
Update bench harness in 2.3 to match master output
2009-08-09 05:45:44 -03:00
Yehuda Katz
3cad1df22e
Benchmarks
2009-08-09 05:45:44 -03:00
Yehuda Katz
7d40ba1cbf
Added benchmark to 2-3
2009-08-09 05:45:44 -03:00
Rich Bradley
0b95a2afab
Fix for nested :include with namespaced models.
...
[#260 state:committed]
2009-08-09 00:31:05 -07:00
Tristan Dunn
9aa9bad024
Don't define a default primary key in the schema dumper.
...
[#1908 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 19:32:03 -07:00
Rob
a25296ab05
Fix binary fixture test on Windows
...
[#2597 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 19:18:54 -07:00
Hugo Peixoto
ac9f9a9c3e
MySQL: fix diacritic uniqueness test by setting the default character set and collation to utf8/utf8_unicode_ci
...
[#2883 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 19:04:05 -07:00
Michael Koziarski
796b7c6ce6
Don't call additional methods on builders passed to the atom_feed helper.
...
Additionally, actually test that the atom_feed helper works with :xml as an option.
[#1836 state:committed]
2009-08-09 13:09:24 +12:00
Marc-Andre Lafortune
819c347f43
Enumerable#sum now works will all enumerables, even if they don't respond to :size
...
[#2489 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 17:51:34 -07:00
Matt Duncan
407fbb5090
Adding :from scoping to ActiveRecord calculations
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-08-09 12:42:47 +12:00
Jan Schwenzien
389449d9ae
Fix HTTP basic authentication for long credentials [ #2572 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 01:28:07 +01:00
Nick Quaranto and Josh Nichols
d39c45690e
Adding a deprecation warning for output.flush when rendering a proc or lambda
...
[#2893 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 17:23:40 -07:00
Steve St. Martin
679a0bf17f
Update truncate documentation / examples to more clearly demonstrate its actual behavior
...
[#3016 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 17:13:15 -07:00
Michael Koziarski
cd5e784389
Depend on rubygems 1.3.2
...
Also move the min_version definition up a line so it's present in the rescue block down below.
2009-08-09 11:13:12 +12:00
Marshall Huss
791c388039
HTTP proxy support
...
[#2133 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 15:35:59 -07:00
Jeremy Kemper
ab6d295ce4
Fix caller in assert_redirected_to deprecation warning.
...
[#2932 state:committed]
2009-08-08 14:45:45 -07:00
Emilio Tagua
6843fb9265
Fix models load order to be able to run unit tests.
...
[#2550 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-08 22:29:35 +01:00
Josh Sharpe
9aaeb18781
Tidy up the AR tests, removing duplicates and making tests clearer / more focussed.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2774 state:committed]
2009-08-08 14:52:16 +12:00
Mike Breen
1c6c216d91
Add option to routes task to target a specific controller with CONTROLLER=x.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2928 state:committed]
2009-08-08 14:39:00 +12:00
Matt Duncan
f73d34c131
Default sent_on time to now in ActionMailer
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2607 state:committed]
2009-08-08 14:10:46 +12:00
Brendan Schwartz
e1d27eedce
Ruby 1.9 compat: fix for SSL in Active Resource
...
[#1272 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-07 12:25:13 -07:00
Jeremy Kemper
4b33155428
Merge branch '2-3-stable' of git@github.com:rails/rails into 2-3-stable
2009-08-05 17:09:43 -07:00
Akira Matsuda
8dab61d146
Ruby 1.9.2 compat: Array#* uses to_str instead of to_s to join values since Ruby 1.9.2
...
[#2959 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-05 17:09:20 -07:00
rick
55501b9f6a
move the serialized AR record logic to #as_json. Leave ActiveRecord::Base#to_json to use the same Object#to_json implementation, but keep it around for documentation purposes.
2009-08-05 16:27:02 -07:00
Sven Fuchs
5a0e295911
Make app template git adapter sync back output immediately by using system() instead of backticks [ #2047 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-05 19:40:11 +01:00
Michael Koziarski
95db8aaa5f
Run the view tests too
2009-08-05 18:42:56 +12:00
Sven Fuchs
bf00de03de
Stop messing with supposedly-deprecated interpolation placeholders when no interpolation values have been passed.
...
[#2885 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-01 20:51:15 -07:00
Jeremy Kemper
6cbcfffeb1
Ruby 1.9: fix reloader tests using lambdas with no env arg
2009-08-01 20:18:22 -07:00
Jeremy Kemper
f09ceb55c0
Ruby 1.9: fix encoding for test_file_stream
2009-08-01 20:17:30 -07:00
Sava Chankov
dc559f274f
Ruby 1.9: fix Content-Length for multibyte send_data streaming
...
[#2661 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-01 20:07:12 -07:00
Jeremy Kemper
7244425b93
Extract String#bytesize shim
2009-08-01 19:52:00 -07:00
Jeremy Kemper
21029451d7
Fix errant require
2009-08-01 19:50:54 -07:00
Jeremy Kemper
32cfd4c2f8
SQLite: deprecate the 'dbfile' option in favor of 'database.'
2009-08-01 18:22:32 -07:00
Hongli Lai (Phusion)
d37ac7958f
Make the new code reloading behavior work with multithreaded environments such as Mongrel.
...
[#2948 state:incomplete]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-01 13:25:38 -07:00
Jeremy Kemper
17f336e2f0
Revert "Methods invoked within named scope Procs should respect the scope stack. [ #1267 state:resolved]"
...
This reverts commit 6a13376525 .
Conflicts:
activerecord/test/cases/named_scope_test.rb
2009-07-29 16:53:49 -07:00
Ross Kaffenburger and Bryan Helmkamp
523f3ba8da
Don't check authenticity tokens for any AJAX requests
2009-07-27 23:15:35 +01:00
Luke Melia
60122e81a3
Avoid loading the ActiveRecord::SessionStore class on initialization if it is not in use [ #2737 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-07-27 23:13:56 +01:00
Sebastian Delmont
ead5d88bf1
Fix filter_parameter_logging of non-hash values within array params
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2927 state:committed]
2009-07-23 09:33:29 +12:00
Michael Koziarski
143c55d325
Memoize cookies so that updates to cookies are available in the current request. [ #2733 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
Conflicts:
actionpack/test/controller/cookie_test.rb
2009-07-22 09:46:53 +12:00
Akira Matsuda
be4d743645
Ruby 1.9.2 compat: name method was renamed to __name__ since MiniTest 1.4.x [ #2922 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-21 01:17:53 -07:00
Akira Matsuda
7a427a83ca
Ruby 1.9.2 compat: Use File#expand_path for require path because "." will not be included in LOAD_PATH since Ruby 1.9.2 [ #2921 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-21 01:17:20 -07:00
Michael Koziarski
c7bcbb983f
Forgot to bump the railties versions
2009-07-19 17:27:45 +12:00
Michael Koziarski
a147becfb8
Move from referencing the BlueCloth constant directly, to referencing Markdown.
...
This supports alternative implementations of markdown such as rpeg-markdown or rdiscount, and later releases of bluecloth. There are some performance issues with earlier releases of bluecloth, and you should probably upgrade. In the event that you can't you can place the following code into an initializer:
Markdown = BlueCloth
2009-07-16 13:30:47 +12:00
Szymon Nowak
b3ec7b2d03
Add primary_key option to belongs_to association
...
[#765 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-07-15 18:14:00 -07:00
Joshua Peek
ae85927ea8
Correctly setup the rack gem dependency.
2009-07-12 19:31:41 -05:00
Joshua Peek
f36d9a6758
Go back to depending on Rack 1.0.x gem
2009-07-12 19:28:04 -05:00
Michael Koziarski
18e68d9524
Prepare version numbers, changelogs and gem dependencies for 2.3.3.
2009-07-12 15:43:39 +12:00
Michael Koziarski
6a50d6c8e3
Match tests with new reloading behaviour
2009-07-08 17:30:33 +12:00
Hongli Lai (Phusion)
bc2c4a4595
Cleanup application after #close has been called on the Rack response body, not when AC::Reload#call is done.
...
The Rack body might lazily evaluate its output, which is for example the case
if one calls 'render :text => lambda { ... }'. The code which lazily evaluates
the output might use other application classes. So we will want to defer
cleanup until the Rack request is completely finished.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-07-08 13:46:10 +12:00
Lawrence Pit
29c5985849
Use the i18n gem if present instead of vendor code. [ #2871 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-07 18:38:02 -07:00
Hongli Lai (Phusion)
d8f8066cd1
Add support for dumping non-standard primary keys when using the SQLite3 adapter. Fix unit tests so that this feature is tested for all adapters.
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-07-07 16:17:49 -07:00
Hongli Lai (Phusion)
31254bedae
Mocha >= 0.9.7 is required, otherwise mocking doesn't work. [ #2874 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-07-07 16:14:22 -07:00
Jesús García Sáez
6673001a5e
Allow symbols on routes declaration (:controller and :action values) [ #2828 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 12:19:38 -07:00
Brian Abreu
944f4fc7d2
Fixed ActiveSupport::OrderedHash::[] work identically to ::Hash::[] in ruby 1.8.7 [ #2832 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 12:01:46 -07:00
Jarl Friis
1c855ad4e7
My suggestion to fix ticket 2401 [ #2401 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 11:56:56 -07:00
Levin Alexander
d8fff7d9d5
make #inspect if zero length duration return '0 seconds' instead of empty string [ #2838 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 11:23:04 -07:00
Yehuda Katz + Carl Lerche
281c1a82de
Fixes a number of tests that inexplicably didn't fail when we committed the original patch
2009-07-02 10:50:39 -07:00
J.D. Hollis
f6f24b71a4
Only check for built extensions on gem dependencies that are in vendor/gems. [ #2825 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 10:28:25 -07:00
Elliot Winkler
0d3c5f0a82
Patch FormTagHelper so that when a form tag is created, the div which holds the form authenticity token is set to display:inline [ #2846 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-01 17:12:45 -07:00
Yehuda Katz + Carl Lerche
4d8fd8d335
Fixes bug where Memcached connections get corrupted when an invalid expire is passed in [ #2854 state:resolved]
2009-07-01 17:00:08 -07:00
Jeremy Kemper
5217c16b09
JSON.escape returns UTF-8 strings
...
[#2849 state:resolved]
2009-07-01 16:27:13 -07:00
Yehuda Katz + Carl Lerche
97ad936148
Updates CI to use latest mocha
2009-07-01 13:49:35 -07:00
Jeremy Kemper
dfdf8e5dab
Merge branch '2-3-stable' of git@github.com:rails/rails into 2-3-stable
2009-07-01 12:55:47 -07:00
Yehuda Katz + Carl Lerche
a8bd3c8a10
Move mocha down below initial T::U require and bump version to 0.9.7 [ #2858 state:resolved]
2009-07-01 12:09:32 -07:00
Yehuda Katz + Carl Lerche
e10305f0f4
Accept Symbol for contoller name [ #2855 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-01 11:51:09 -07:00
Chris Mear
eb52dc3db7
Make text_area_tag escape contents by default.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-27 13:15:53 +12:00
Michael Koziarski
9407f6e9a4
Make filter_parameters work correctly with array parameters.
...
Conflicts:
actionpack/lib/action_controller/base/filter_parameter_logging.rb
2009-06-27 13:11:01 +12:00
Joshua Peek
6720b25b2d
send_data should set Content-Length as a string
2009-06-25 14:44:09 -05:00
Jeremy Kemper
22554745b7
Turn on autolist for debugging also
2009-06-18 21:54:56 -04:00
Jeremy Kemper
8b9b954f40
Friendlier runtime exception if delegatee is nil
2009-06-18 20:11:02 -04:00
Jeremy Kemper
b75bc05bc5
Delegated methods report the expected file/line in backtraces
2009-06-18 18:06:42 -04:00
Joshua Peek
a491b19502
Add :concat option to asset tag helpers to force concatenation.
...
This is useful for working around IE's stylesheet limit.
stylesheet_link_tag :all, :concat => true
2009-06-15 10:23:55 -05:00
Luca Guidi
447d60e9ed
Bytes calculation speed up
...
[#2800 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-13 14:06:01 -07:00
Jeremy Kemper
cb9429a259
Update memcache-client to 1.7.4 for cheaper timeouts
2009-06-11 22:34:23 -07:00
Joshua Peek
25fde77674
Vendor rack 1.0.x stable
2009-06-11 19:39:21 -05:00
Andrew Kaspick
d3d4822262
allow absolute paths for the asset caches
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-11 16:33:01 +12:00
Jeremy Kemper
7e1bcef985
Remove dead AbstractRequest autoload
2009-06-09 23:51:04 -07:00
Michael Koziarski
19c38a9b70
Whitelist the methods which are called by multiparameter attribute assignment.
...
This prevents users from causing NoMethodErrors and the like by editing the parameter names, and closes a potential exploit of CVE-2009-1904.
2009-06-10 12:11:18 +12:00
Matt Jones
f43404d42b
Fix incorrect specification path in GemDependency#from_directory_name
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-10 09:54:49 +12:00
Stephen Anderson
cd14a4a00e
Sanitized the id generated by text_area_tag helper method. text_area_tag('item[description]') should return: <textarea id="item_description" name="item[description]"></textarea> instead of: <textarea id="item[description]" name="item[description]"></textarea> The old id was causing HTML validation failures.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:36:37 +12:00
David Stevenson
898a8801ff
Made label target radio button tags with values. Radio button now respects inherited :index options when generating id.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:29:02 +12:00
Friedrich Göpel
72d111a21c
1.9 compatibility - don't pass an array as the from address as this ends up generating invalid SMTP commands.
2009-06-09 20:24:19 +12:00
Steven Luscher
d63fab344f
Fixes #2439 . ActionController::Integration::Session no longer mangles multiparameter attribute params when processing multipart requests.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:14:01 +12:00
Eugene Pimenov
c5c022c705
PostgreSQL adapter should call thread safe quote_string function
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:11:51 +12:00
Tom Ward
d97073337c
Change autoload declaration in ActionView::Helpers from JavascriptHelper to JavascriptHelper, matching the actual helper name. Also removed require from UrlHelper which was inadvertently preventing the autoload typo from causing a failure.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 20:08:23 +12:00
Michael Koziarski
b1a044b629
Revert "Ensure HasManyThroughAssociation#destroy delete orphan records"
...
This reverts commit 7a85927da2 .
There's still some debate about the intended behaviour in the ticket, leaving in master but removing prior to shipping 2.3.3
2009-06-09 20:03:36 +12:00
Matt Jones
2c3d2906b2
Fix several issues with the 2.3.2 gem loader.
...
Incorporates the following:
- migrates back small change to gems:build:force from bfc1609a50 to finish closing #2266 .
- unrolls to_proc calls in gems.rake, to match the change in master.
- fixes #2722 by passing the options hash to dependencies during build. (includes a test)
- fixes #2721 by loading the specification directly in from_directory_name. Adds an option to opt-out of specification loading when needed (in gems:refresh_specs, for instance). Includes tests.
- fixes #2679 by refreshing specs for all frozen gems rather than just gems loaded from the environment.
- fixes #2678 by passing the options hash to dependencies during unpack.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 19:57:23 +12:00
nate
056ddbdcfb
A test to show that http_authentication needs to fail authentication if the password procedure returns nil. Also includes a fix to validate_digest_response to fail validation if the password procedure returns nil.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-09 19:47:16 +12:00
Pratik Naik
5fb66a3abb
Vendor Rack edge ( commit : 815342a8e15db564b766f209ffb1e340233f064f )
2009-06-08 23:47:36 -07:00
Jeremy Kemper
e70272e2a4
Clearer String#first and #last edge cases. Fix that 'foo'.first(0) == 'foo' instead of ''
2009-06-08 20:42:39 -07:00
Jeremy Kemper
63d0c33787
Fix AR json encoding
2009-06-08 20:42:39 -07:00
Jeremy Kemper
f9b2227649
Qualify constant references in BasicObjects
2009-06-08 20:42:39 -07:00
Jeremy Kemper
756e82d1b6
Prefer JSON.encode(value) to value.to_json
2009-06-08 20:42:39 -07:00
Jeremy Kemper
74f16a56e7
Simplify json decoder backend lazy load
2009-06-08 20:42:39 -07:00
Jeremy Kemper
f1e75e4378
Add #element and #collection to ModelName
2009-06-08 20:42:39 -07:00
Jeremy Kemper
cc5d313a48
Lazier Rakefile requires to avoid needing full rake gem on 1.9
2009-06-08 20:42:39 -07:00
Jeremy Kemper
91727ae5e4
Ruby 1.9: sqlite escape encoding
2009-06-08 20:42:31 -07:00
Jeremy Kemper
91fbdfd5b3
Failsafe doesn't return bare String body
2009-06-08 20:35:52 -07:00
Jeremy Kemper
05abd7c196
Check for to_str instead of String
2009-06-08 20:35:52 -07:00
Jeremy Kemper
aebd1ba5b4
Integration tests use Rack::Lint on 1.9 also
2009-06-08 20:35:51 -07:00
Jeremy Kemper
ec10f13939
Ruby 1.9: fix json encoding
2009-06-08 15:18:11 -07:00
Jeremy Kemper
01f820c3b2
Use to_json instead of rails_to_json
2009-06-08 14:09:16 -07:00
Jeremy Kemper
a69ee11968
JSON: split encoding and coercion
2009-06-08 01:37:28 -07:00
Jeremy Kemper
4a78dae2ab
Revert rails_to_json -> to_json so we don't break compatibility
...
[#2753 state:resolved]
2009-06-08 00:11:12 -07:00
Jeremy Kemper
4b4164e8a8
Don't rely on Rails.logger
2009-06-08 00:09:50 -07:00
Tim Connor
84a755b27e
Work around a gem dependency edge case that prevents Rails from booting..
...
If you have a frozen gem with unfrozen dependencies (for instance if the
dependency has native extensions so can't be frozen) you can have a
nightmare upgrade problem, where you cannot rake gems:install, because
rake is broken by a gem loading problem.
If you bump up your frozen gem to a newer version that requires a newer
dependency, everybody else on the team will have rake broken by that
dependency mismatch, since you will have had to specify the dependency
in your config.gems, otherwise nobody will have installed it, since the
parent is frozen. And now the config.gems loading code will kill rake.
[#2609 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-06-05 23:06:19 -07:00
Michael Koziarski
b600bf2cd7
name is case sensitive, update tests to reflect that
2009-06-01 14:21:08 +12:00
Han Kessels
4d7c597e84
fix for IE incompatibility of :disable_with in submit_tag
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-01 14:03:35 +12:00
Ian Terrell
a92790ab86
added a failing test case for counting has_many :through associations with scopes
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-06-01 13:54:56 +12:00
Michael Koziarski
34c3162c5c
Revert "Ensure calculations respect scoped :select". Broke .count on a has_many :through association.
...
This reverts commit 6543426c73 .
2009-06-01 13:54:20 +12:00
Joshua Peek
c73cf7d2c0
Revert "Only save the session if we're actually writing to it [ #2703 state:resolved]"
...
This reverts commit 14edaa104d .
2009-05-30 09:36:32 -05:00
Johan Sörensen
14edaa104d
Only save the session if we're actually writing to it [ #2703 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-28 09:32:16 -05:00
Johan Sörensen
dc94c09503
The FlashHash and friends causes a lot of needless session storing, when we know for a fact that there's no content in the flash. By not storing the empty hash in the session we save a lot of communication with the various session backends, while still keeping the same interface to the flash. [ #2703 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-28 09:22:35 -05:00
Hongli Lai (Phusion)
34a1ed0df8
Make the Failsafe middleware attempt to render 500.html during failsafe response rendering. Also make the default static failsafe response more friendly, in case 500.html rendering fails. [ #2715 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-27 14:59:11 -05:00
calavera
4196616778
ensure initialize_database_middleware doesn't use ActionController if action_controller framework is not enabled [ #2680 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-27 14:56:26 -05:00
Joshua Peek
b4c7b3e893
Ensure Memcache local cache returns duplicated values [ #2302 state:resolved]
2009-05-27 14:55:13 -05:00
Hongli Lai (Phusion)
9b2a665aff
activesupport/json/encoders fix that to_json should call rails_to_json, not just be an alias to the rails_to_json method defined in Object. Fixes #2690
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-25 15:28:14 +02:00
Eloy Duran
a70c78177a
Ensure the parent record is always saved when the child is invalid. [ #2249 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-20 21:19:30 +02:00
Bryan Helmkamp
542d6a0abd
Use duck typing to also allow MemCache-like object when initializing a MemCacheStore
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-19 16:58:20 -07:00
Jeremy Kemper
2a657725f1
Mark pending release in changelog instead of edge
2009-05-19 10:59:24 -07:00
Bryan Helmkamp
6339e5d360
Allow MemCacheStore to be initialized with a MemCache object instead of addresses and options
2009-05-19 10:58:30 -07:00
Jeremy Kemper
9fcadcbd68
Fix imprecise float comparison
2009-05-18 14:34:32 -07:00
Joe Van Dyk
ad85771221
Add ability to get multiple memcached keys at the same time (via MemCacheStore#read_multi).
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-18 13:44:45 -07:00
Ken Collins
50608ecccd
Reimplement Fixtures.identify so that it consistently generates identities across ruby versions.
...
[#2633 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-18 13:42:04 -07:00
Luca Guidi
7a85927da2
Ensure HasManyThroughAssociation#destroy delete orphan records [ #2251 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-18 22:31:14 +02:00
Pratik Naik
97b75c9f16
Make sure default_scope#create checks for options[:conditions] [ #2181 state:resolved] [James Le Cuirot]
2009-05-18 21:27:55 +02:00
Pratik Naik
dbb0258279
Ensure HTTP Digest auth uses appropriate HTTP method [ #2490 state:resolved] [Steve Madsen]
2009-05-18 17:00:29 +02:00
rick
2b5e4f38f5
load the JSON Backend lazily.
2009-05-17 19:16:11 -07:00
Jeremy Kemper
5b80ead2a3
Extract json string escaping
2009-05-17 18:42:56 -07:00
Jeremy Kemper
cc47d3ff0c
Only Object to_json alias is needed. Prefer nil options.
2009-05-17 18:42:44 -07:00
rick
d052e9fb58
Add pluggable JSON backends with support for the JSON gem.
...
Example: ActiveSupport::JSON.backend = "JSONGem"
All internal Rails JSON encoding is now handled by
ActiveSupport::JSON.encode(). Use of #to_json is not recommended, as it
may clash with other libraries that overwrite it. However, you can
recover Rails specific functionality
if you really want to use #to_json.
gem 'json'
ActiveSupport::JSON.backend = "JSONGem"
class ActiveRecord::Base
alias to_json rails_to_json
end
2009-05-17 18:40:38 -07:00
Joshua Peek
43e537b9e8
Missed a file from the previous commit
2009-05-17 14:45:06 -05:00
Joshua Peek
e30016c29e
Fix reset_session with ActiveRecord store [ #2200 state:resolved]
2009-05-17 14:44:19 -05:00
Mike Breen
f383a4aa33
Allow assert_template to take a symbol [ #2011 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 19:40:18 +02:00
Paulo Schneider
14b769899c
Fix typo in the generated routes.rb [ #2433 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 15:00:41 +02:00
Jacob Kjeldahl
d5f018eb10
Supply valid ruby-prof parameters [ #1804 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 14:53:50 +02:00
Daniel Guettler
4cd40726eb
has_one :through should not create a new association when assigned nil [ #698 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-05-17 14:50:09 +02:00
Pratik Naik
ba92e83bcc
Include guides directory in the rails gem
2009-05-16 17:08:34 +02:00
José Valim
66ead4f148
Allow strings to be sent as collection to select.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2391 state:committed]
2009-05-15 15:30:42 +12:00
Joshua Peek
f7cb7fce4c
Sweeper does not belong in Sweeping module
2009-05-14 16:47:24 -05:00
Peter Marklund
0380e9ca5f
Changed ActiveRecord::Base#exists? to invoke find_initial so that it is compatible with, and doesn't lose, :include scopes (references to eager loaded tables)
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2543 state:committed]
2009-05-14 20:42:13 +12:00
Jeremy Kemper
35e1785081
Revert "Fixed bug with polymorphic has_one :as pointing to an STI record"
...
[#2594 state:open]
This reverts commit 93c557828e .
2009-05-11 12:21:59 -07:00
Douglas F Shearer
2bcb2443a9
ActiveSupport::OrderedHash[1,2,3,4] creates an OrderedHash instead of a Hash.
...
[#2615 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-11 11:46:43 -07:00
Joshua Peek
4051dd3412
Fix syntax error from 5ac05f15
2009-05-09 22:22:14 -05:00
Anthony Crumley
88d5e3341d
Fixed eager load error on find with include => [:table_name] and hash conditions like {:table_name => {:column => 'value'}}
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-10 13:33:22 +12:00
John Small
7bf9bf3dd6
Add configuration options for :dasherize and :camelize calls to Hash#to_xml
...
People using ActiveResource & REST to integrate with other systems need to be able to control the default dasherize behavior of Hash.to_xml.
Currently there is no test for a default value, but existing code asssumes it's true. This patch adds tests for the default value and adds
mattr_accessor to ActiveSupport for :dasherize_xml and :camelize_xml. These module attributes set the defaults for :dasherize and :camelize in
rename_keys inside Hash#to_xml. The tests have been changed to separate out the testing of the parameter options for :camelize
and :dasherize so that we only test one thing at a time. We also test default values for :camelize_xml and :dasherize_xml.
The module attribute dasherize_xml is set to true in this patch to maintain existing code. But at some point in the future it should be set to
false because Hash#to_xml probably should not set underscores to dashes by default.
Changed documentation on ActiveResource#to_xml to correctly describe the behaviour of Hash#to_xml. The previous documentation said that
the default for :dasherize was false, in fact it was and still is true, but we now have a way to change the default. I've also added
documentation for the :camelize option.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-05-10 13:09:40 +12:00
Ken Collins
6dec3c45fc
ActiveSupport::OrderedHash#to_a method returns an ordered set of arrays. Matches ruby1.9's Hash#to_a.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2629 state:committed]
2009-05-10 13:05:14 +12:00
Joshua Peek
e61cceb37f
Don't stream each line of the body, just send the whole thing
2009-05-08 17:00:16 -05:00
Joshua Peek
7f1f16c01f
Deprecate assert_redirect_to's partial hash matching. This will be fully removed in 3.0.
2009-05-04 20:24:49 -05:00
Wincent Colaiuta
5ac05f15c6
Extract ActionController::Caching::Sweeper into separate file [ #1977 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-04 20:17:27 -05:00
Tim Connor
49169f7a6a
fix problems with requires in metal choking under development reloading [ #2579 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-04 20:12:16 -05:00
codebrulee
ebe8dd6108
Remove stray underscore from the hash conversion methods which broke backwards compatibility with Hash.from_xml
...
Also add an all-caps test to prevent future regressions
2009-05-04 09:51:35 -07:00
Ruy Asan
17e712d3a3
Added routing test for irregular ID requirements and custom member action.
...
[#2595 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-01 15:02:51 -07:00
Ruy Asan
93c557828e
Fixed bug with polymorphic has_one :as pointing to an STI record
...
[#2594 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-01 14:49:38 -07:00
Alexander Podgorbunsky
628b4ad679
Default scope :order should be overridden by named scopes.
...
[#2346 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-05-01 14:45:35 -07:00
Jeremy Kemper
a5ed7eede6
Missed commit for 7c4b325e0a
2009-04-30 16:49:34 -07:00
John F. Douthat
d1d1894c2f
Fix action-cached exception responses.
...
Methods raising ActiveRecord::RecordNotFound were returning 404 on first request and 200 OK with blank body on subsequent requests.
[#2533 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-30 16:48:07 -07:00
Jeremy Kemper
7c4b325e0a
Fix render :json => nil [ #2589 state:resolved]
2009-04-30 16:47:42 -07:00
David Dollar
00eee49e1e
Additional tests for the gem subsystem
...
* test_gem_ignores_development_dependencies
* test_gem_guards_against_duplicate_unpacks
* test_gem_does_not_unpack_framework_gems
[#2236 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-29 08:08:48 -07:00
David Dollar
6e3bede928
Attempt to deal with more cases of gems with native components.
...
This commit adds a rudimentary check for 'unbuilt' gems, so that we can abort
the application load if there are any gems that have native components that
have not yet been built.
The rake task gems:build has now only builds 'unbuilt' gems as a result.
The rake task gems:build:force has been added to deal with cases of incomplete
builds, or any case where you need to force the build of all of your gems.
Changes the gems:build task to get its gem list by parsing directory entries
in vendor/gems, which sidesteps the chicken/egg issues involved with having a
gem unpacked into vendor/gems without before its native bits are compiled.
[#2266 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-28 23:19:18 -07:00
Stephen Bannasch
4b68debb1c
add JRuby-JDOM backend for XmlMini
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-26 16:23:22 -07:00
Hongli Lai (Phusion)
2633108e1f
Fix environment variable testing code in failsafe.rb.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-26 11:22:44 -05:00
Hongli Lai (Phusion)
5e57e2fa58
Remove reference to Rack::RewindableInput, which has been removed a while ago.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-26 11:21:15 -05:00
Yehuda Katz
cb9a1f17f0
Updated 2-3-stable to Rack 1.0
2009-04-25 12:47:51 -07:00
Joshua Peek
61a1456937
Remove RewindableInput middleware since all input MUST be rewindable according to a recent change in the Rack 1.0 SPEC
2009-04-25 14:05:58 -05:00
Joshua Peek
16f36b6171
Remove vendored version of Rack
2009-04-25 13:59:26 -05:00
Joshua Peek
2d9b45722c
Remove pending rack specifications until they are official
2009-04-25 13:44:34 -05:00
Jeremy Kemper
617d7eb57b
Merge branch '2-3-stable' of git@github.com:rails/rails into 2-3-stable
2009-04-22 01:08:53 -07:00
Pratik Naik
09a976ac58
Change table to prevent copying indexes on sqlite2
2009-04-21 13:29:00 +01:00
Pratik Naik
5bbd097ce9
Specify :group with the table name for it to work on sqlite3
2009-04-21 13:12:15 +01:00
Pratik Naik
3267097393
Fix tests for sqlite3 3.6.xx
2009-04-21 13:08:26 +01:00
Max Lapshin
5a4603fafb
Fixed dumping from postgresql columns in index in wrong order. [ #2515 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:45:02 +01:00
Scott Woods
70ba90b072
Quote table names when casting to regclass so that capitalized tables are supported. [ #2418 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:44:54 +01:00
Max Lapshin
de4cc53f74
Fixed wrong quoting of index names in postgres [ #2402 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
2009-04-21 11:44:47 +01:00
Max Lapshin
6060123470
Support multiple schemas in table names for postgresql [ #390 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-21 11:40:12 +01:00
Pratik Naik
fc2421b784
Ensure :dependent => :delete_all works for association with hash conditions
2009-04-21 11:33:27 +01:00
Pratik Naik
375e8976e3
Ensure JoinAssociation uses aliased table name when multiple associations have hash conditions on the same table
2009-04-20 13:56:03 +01:00
Mislav Marohnić
35c5727ace
Always buffer rack.input if it is not rewindable
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-17 21:54:09 -05:00
Mislav Marohnić
878aec9d95
Improve rewindable input test coverage so tests fail when you remove the middleware
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-17 19:35:25 -05:00
Jeremy Kemper
c9a3d99164
Clearer String#first and #last edge cases. Fix that foo.first(0) == instead of foo.
2009-04-17 18:06:47 -05:00
David Heinemeier Hansson
fa750e08a8
Added :touch option to belongs_to associations that will touch the parent record when the current record is saved or destroyed [DHH]
2009-04-16 17:26:10 -05:00
David Heinemeier Hansson
50e867480a
Added ActiveRecord::Base#touch to update the updated_at/on attributes with the current time [DHH]
2009-04-16 16:48:07 -05:00
Doug McInnes
dc69d9308a
Fix for TestResponse.cookies returning cookies unescaped [ #1867 state:resolved]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-04-07 13:22:21 -05:00
Kenny Ortmann
ace154d067
added tests for session options being defaulted correctly to rack defaults [ #2403 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-04-07 11:08:04 -05:00
Ryan Angilly
651611999d
adding session_options initialization and test [ #2303 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:29 -05:00
thedarkone
6a1267a0b1
Fix template extension parsing. [ #2315 state:resolved] [ #2284 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:24 -05:00
thedarkone
d2e6a0fbc3
Simplify handling of absolute path templates. [ #2276 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:20 -05:00
David Dollar
dace54b2e9
Updates tests to cause the tests for the Request class not to proxy through a fake TestRequest object [ #2278 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:14 -05:00
Peter Marklund
daffa5cbdd
Reset request_parameters in TestRequest#recycle! to avoid multiple posts clobbering each other [ #2271 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-03-24 10:53:07 -05:00
Joshua Peek
c91912700d
just kill brittle test
2009-03-24 10:52:49 -05:00