Commit Graph

23904 Commits

Author SHA1 Message Date
Santiago Pastorino
d632e927ec Merge pull request #1807 from caius/find_in_batches_id_bug
Bugfix by stopping find_in_batches using the records after yielding.
2011-07-14 07:57:04 -07:00
Aaron Patterson
db0a65cbe0 Merge pull request #2066 from amatsuda/magicome
missing magic comments
2011-07-14 01:30:53 -07:00
Akira Matsuda
99d598a131 need magic comments 2011-07-14 12:39:34 +09:00
Aaron Patterson
003c6516dc Merge pull request #2052 from amatsuda/fullwidth_blank
treat fullwidth whitespace as a blank character
2011-07-13 19:04:28 -07:00
Santiago Pastorino
54ab63ee77 Bump rack up 2011-07-13 21:40:46 -03:00
Akira Matsuda
9c60860322 treat fullwidth whitespace as a blank character 2011-07-14 07:48:39 +09:00
José Valim
704ee0df65 Use cache/assets instead. 2011-07-12 22:55:34 -03:00
José Valim
8f0e0b63f5 assets.cache_store now defaults to filesystem. You will want to share tmp/assets_cache between deploys. 2011-07-12 22:30:17 -03:00
Santiago Pastorino
8cf45150de Merge pull request #2042 from SAP-Oxygen/master-sqlbypass-patch
Fix for SqlBypass session store (for master)
2011-07-12 15:06:00 -07:00
Santiago Pastorino
4735e2ec65 Merge pull request #2041 from SAP-Oxygen/master-session-id-patch-with-test
Fixed session ID fixation for ActiveRecord::SessionStore (for master)
2011-07-12 15:05:29 -07:00
José Valim
8f58bd49d7 Merge pull request #2038 from FLOChip/extra_space
remove extra space since comment_if already returns the space.
2011-07-12 11:49:32 -07:00
Joseph Wong
88e6c06242 Fix for SqlBypass session store
Two issues fixed:
1) connection_pool is not defined - needed by SessionStore#drop_table!
and create_table! since c94651f

2) initialization of connection to the default of AR::Base.connection
only occurred at the singleton level - the instance level method defined
by cattr_accessor did not have this logic
2011-07-12 11:10:25 -07:00
Joseph Wong
66dee26930 Fixed session ID fixation for ActiveRecord::SessionStore
I have found that Rails will take an invalid session ID specified by the
client and materialize a session based on that session ID. This means
that it is possible, among other things, for a client to use an
arbitrarily weak session ID or for a client to resurrect a previous used
session ID. In other words, we cannot guarantee that all session IDs are
generated by the server and that they are (statistically) unique through
time.

The fix is to always generate a new session ID in #get_session if an
existing session cannot be found under the incoming session ID.

Also added new tests that make sure that an invalid session ID is never
materialized into a new session, regardless of whether it comes in via a
cookie or a URL parameter (when :cookie_only => false).
2011-07-12 11:09:11 -07:00
Teng Siong Ong
5e73a2fa50 remove extra space since comment_if already returns the space. 2011-07-13 00:59:30 +08:00
Jon Leighton
e4479b2f1b Fix failure in test_preserves_existing_fixture_data from test/cases/fixtures_test.rb when UTC and local time occur on different dates. 2011-07-12 00:14:45 +01:00
Jon Leighton
1712d90050 Fix exception if old and new targets are both nil. Fixes #1471. 2011-07-12 00:14:45 +01:00
Joshua Peek
5c8be9eb86 Ensure Dir.glob is sorted 2011-07-11 16:09:46 -07:00
Marc-Andre Lafortune
eeb58b0934 Generate valid default fixtures for models with a type column
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-07-11 19:47:57 -03:00
José Valim
1939fa3f16 Merge pull request #1722 from AndrewRadev/grouped-select
Make "select" helper handle nested collections
2011-07-11 10:25:04 -07:00
José Valim
133a20354e Merge pull request #1756 from shtirlic/xmlschema_fix
Fix xmlschema output with fraction_digits >0
2011-07-11 10:00:28 -07:00
Andrew Radev
587dd7d56c Grouped select helper
FormBuilder#select now works with a nested data structure.
2011-07-11 19:08:23 +03:00
Xavier Noria
91bba21815 Merge pull request #2032 from dziulius/master
#many? - uses count instead of select
2011-07-11 08:36:15 -07:00
shtirlic
c2b79c011f Fix xmlschema output with fraction_digits >0
Current implementation produce incorrect output when Time#usec returns
integer < 100000, because to_s doesn't add leading zeros.
2011-07-11 18:41:04 +04:00
José Valim
1fdbd4708f Merge pull request #2009 from vatrai/autoload-todo-new
TODO fix explicitly loading exceptations, autoload removed
2011-07-11 07:35:43 -07:00
José Valim
3da3df8fcb Require assets in all environments by default and provide a way to opt-out from uglifier. 2011-07-11 11:19:03 -03:00
José Valim
d5e8722683 Merge pull request #2029 from sikachu/acronym_mention
Mention about acronym inflection in config/initializers/inflections.rb
2011-07-11 06:51:24 -07:00
Prem Sichanugrist
75cfd037cb Mention about acronym inflection in config/initializers/inflections.rb
Closes #1366
2011-07-11 09:45:33 -04:00
Santiago Pastorino
539d684b7a Merge pull request #1929 from sobrinho/master
Create a test case for disable_referential_integrity
2011-07-11 06:00:59 -07:00
Julius Markūnas
ea0eb02f48 #many? uses count instead of select - a bit faster 2011-07-11 14:59:51 +03:00
José Valim
8f2e32158b Merge pull request #1608 from sishen/sishen
MemcacheStore: deserialize the entry reading from local_cache when using
2011-07-11 04:54:28 -07:00
José Valim
e9f9ce971e Merge pull request #1296 from c42engineering/issue636
Resubmitting issue #636 as a pull request
2011-07-11 04:28:00 -07:00
José Valim
871d7fad03 Merge pull request #1924 from cesario/1922-get-back-and-deprecate-env-default
Put back Rails.application#env_default and deprecate it [Closes #1922]
2011-07-11 04:20:48 -07:00
Franck Verrot
ea649de669 Rails.application#env_config is now public API. [Closes #1924] 2011-07-11 11:05:26 +02:00
Vishnu Atrai
525fd3ac86 TODO fix explicitly loading exceptations, autoload removed 2011-07-11 13:14:02 +05:30
Sidu Ponnappa
83555a5398 Issue #636 - Parsing an xml file with multiple records and extra attributes (besides type) fails 2011-07-11 11:41:22 +05:30
Santiago Pastorino
c3732bfed0 Merge pull request #1823 from gnarg/master
Log instrumentation name for exists? queries
2011-07-10 18:02:31 -07:00
José Valim
60076de1d4 Make Rails.groups accept arrays. 2011-07-10 08:36:08 -03:00
José Valim
3a611cb207 Merge pull request #2026 from spohlenz/asset-tag-fix
Include TagHelper within AssetTagHelper
2011-07-10 03:58:57 -07:00
Sam Pohlenz
0ac79d0343 Include TagHelper within AssetTagHelper 2011-07-10 12:37:32 +09:30
Santiago Pastorino
c5448721b5 to_key on a destroyed model should return nil 2011-07-09 15:36:57 -03:00
Santiago Pastorino
bc364afb93 Merge pull request #2007 from amatsuda/having_vargs_nomethoderror_fix
having() raises NoMethodError: undefined method `empty?' when the given argument does not respond to empty?
2011-07-09 05:20:42 -07:00
Akira Matsuda
7c921fbf15 formats 2011-07-09 20:14:41 +09:00
Akira Matsuda
d1545bcf94 fix AR having() not to raise NoMethodError when the given argument does not respond to empty?
having raises NoMethodError: undefined method `empty?' when a Fixnum or Date/Time were passed via varargs
2011-07-09 20:14:41 +09:00
Jon Leighton
111968d402 Foo.joins(:bar).includes(:bar) should result in a single query with :bar as a join. Related: #1873. 2011-07-09 11:39:04 +01:00
Xavier Noria
b65bd01d55 Merge branch 'master' of git://github.com/lifo/docrails 2011-07-09 12:20:24 +02:00
José Valim
6917c65f04 Merge pull request #2017 from Casecommons/active_record_lint
ActiveRecord::Base subclasses should pass ActiveModel::Lint.
2011-07-08 18:34:02 -07:00
Ryan Bigg
1835aba6f1 Add section about debugging assets 2011-07-09 10:54:08 +10:00
Ryan Bigg
678dd6f5d6 Clarify that per-controller asset files are not 'magically' loaded by the controller, but rather need to be required 2011-07-09 10:54:08 +10:00
Santiago Pastorino
d9182c0ae9 config should always be an AS::InheritableOptions object. Closes #1992 2011-07-08 21:45:53 -03:00
Grant Hutchins & Peter Jaros
6b9c38c1a8 ActiveRecord::Base should pass ActiveModel::Lint. 2011-07-08 17:51:40 -04:00