Akira Matsuda
8a4fdbbcd3
formats
2011-07-09 21:35:19 +09:00
Akira Matsuda
7f37ed0152
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 21:35:09 +09:00
Jon Leighton
ca94acf0be
Foo.joins(:bar).includes(:bar) should result in a single query with :bar as a join. Related: #1873 .
2011-07-09 11:39:38 +01:00
Ryan Bigg
7a8b0eced7
Add section about debugging assets
2011-07-09 12:26:25 +02:00
Ryan Bigg
d0f9a31a0d
Clarify that per-controller asset files are not 'magically' loaded by the controller, but rather need to be required
2011-07-09 12:26:16 +02:00
Christopher Scott Hernandez
d17d45595b
Updated active_record_querying.textile: intro paragraph of 'Conditions' to change 'find method' to 'where method'
2011-07-09 12:25:57 +02:00
Vijay Dev
6dad5b2d11
update Rails version. (rails console didn't exist in 2.1)
2011-07-09 12:25:49 +02:00
Oge Nnadi
2f5ebd9a0e
Changed the value that log_level takes to match the examples in the paragraph above
2011-07-09 12:25:40 +02:00
Akira Matsuda
3cb67e442f
find(:first) => first
2011-07-09 12:24:07 +02:00
Shawn Drost
a9f4d7b4d2
document HashWithIndifferentAccess#extractable_options?
2011-07-09 12:22:57 +02:00
JudeArasu
4f36daf1a6
rails text been added before version
2011-07-09 12:22:50 +02:00
James Miller
bd13a6824e
Remove attachment_fu, add CarrierWave to suggested uploader libraries
2011-07-09 12:22:42 +02:00
Santiago Pastorino
2aefff8f76
config should always be an AS::InheritableOptions object. Closes #1992
2011-07-08 21:44:31 -03:00
Xavier Noria
7cef8ad32f
backports f6a6b51 and ad912c0
2011-07-09 00:10:50 +02:00
Tomas D'Stefano
15f5c3bcbd
Destroy association habtm record before destroying the record itself. Fixes issue #402 .
2011-07-08 22:31:50 +01:00
Jon Leighton
6d2acc1195
Ensure that the foreign key gets set when doing record.create_association or record.create_association. Fixes #1960 .
2011-07-08 21:03:40 +01:00
José Valim
9370855d54
Move config.default_asset_host_protocol to the railtie.
2011-07-07 19:16:36 -03:00
Santiago Pastorino
d7be017c7e
Merge pull request #2002 from knapo/3-1-stable
...
Backport of #1997
2011-07-07 09:30:16 -07:00
Santiago Pastorino
0b62aa021f
Merge pull request #2001 from tobsch/3-1-stable
...
Now accepting css/js files in deeper directory structures by default.
2011-07-07 09:23:13 -07:00
knapo
7c051ab075
Make ActiveRecord::Batches#find_each to not return self.
...
This caused that `find_each` was producing extra db call taking all the records from db, and was less efficient than `ActiveRecord::Base#all`.
2011-07-07 18:13:29 +02:00
Tobias Schlottke
564139620c
Now accepting css/js files in deeper directory structures by default.
...
This is useful for engines with own application.{js|css}-files.
See: https://github.com/rails/rails/issues/1520
2011-07-07 17:56:48 +02:00
Dmitriy Kiriyenko
fd8dbfa776
Add require ActiveSupport delegation to ActiveRecord::Relation class.
2011-07-07 17:09:03 +02:00
Santiago Pastorino
ec27814883
Merge pull request #1990 from simonbaird/3-1-stable
...
rake db:test:purge creates mysql database with wrong charset & collation (3-1-stable)
2011-07-06 20:10:17 -07:00
José Valim
8d0f03923c
Give higher priority to assets.cache_store.
2011-07-06 18:00:39 -07:00
José Valim
d8e2a1fd8a
Make compressors lazily load.
2011-07-06 21:45:36 -03:00
Jon Leighton
fe2167f3f1
Don't construct association scope in initializer. This yields a big performance gain for cases where the association is never used to load the target, for example with preloading. Related: #1873 .
2011-07-07 01:08:06 +01:00
Simon Baird
f44c3ea457
Fix charset/collate in mysql recreate_database
...
See new method mysql_creation_options. It is used by both
create_database and recreate_database so they are consistent.
(Manual cherry pick of 3ba3125b24 )
2011-07-07 09:43:16 +10:00
José Valim
a05d59fe06
Deprecate stream at the class level.
...
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337 .
2011-07-06 20:33:01 -03:00
Santiago Pastorino
3a92bc7906
Merge pull request #1789 from grantneufeld/schema_column_exists_options_hash_3_1
...
Fix default options argument on ActiveRecord::ConnectionAdaptors::Table#column_exists?
2011-07-06 12:00:35 -07:00
Santiago Pastorino
e7ac539c62
Merge pull request #1904 from oriolgual/1571_fix_for_3_1_stable
...
Fix #1571 for 3-1-stable
2011-07-06 11:57:36 -07:00
Oriol Gual
7c6a8406f4
Fix reverse order with new Arel Nodes ( #1571 )
2011-07-06 20:50:56 +02:00
Santiago Pastorino
d5bc701e87
Merge pull request #1982 from spohlenz/backport-1778
...
Backport of #1778 (fix nested fields_for when Hash-based model is passed)
2011-07-06 11:36:05 -07:00
Santiago Pastorino
01d881cb3e
Merge pull request #1895 from arunagw/fix_test_for_jruby_db-3-1-stable
...
Fix test for jruby db 3 1 stable
2011-07-06 11:15:55 -07:00
Xavier Noria
afe8eb56ec
Merge pull request #1983 from vijaydev/cherrypicks-validator-gem
...
Cherrypick for 3-1-stable - adding w3c_validators gem
2011-07-06 05:37:19 -07:00
Vijay Dev
53903f4265
add w3c_validators gem to the doc group to fix failing validation of guides
2011-07-06 17:50:54 +05:30
Sam Pohlenz
7f3e45c2ec
Test for extractable_options? within nested fields_for.
...
This fixes an error when a record object that is a subclass of Hash is
passed to fields_for, which is incorrectly interpreted as field options.
2011-07-06 21:25:07 +09:30
Xavier Noria
07ea84a03b
syncs guides with master
2011-07-05 01:49:25 +02:00
Dieter Komendera
5a7c8e27eb
Only call set_owner_attributes for has_one association if target exists.
2011-07-05 00:15:43 +01:00
Andrew White
5bb37ab867
Revert "The rails gem doesn't have a lib directory."
...
RubyGems requires at least one require_path.
This reverts commit 92c852f7e2 .
2011-07-04 16:57:36 +01:00
Andrew White
92c852f7e2
The rails gem doesn't have a lib directory.
2011-07-04 14:54:29 +01:00
Andrew White
cee27beb0c
Use an instance variable to store the current masss assignment options
...
(cherry picked from commit 9f7442a3ab )
2011-07-04 06:49:15 +01:00
Vijay Dev
d764378489
Reversing the changes done in c278a2c while still resolving #1857 .
...
The changes broke bulk migration tests and were fixed in 4d256bc6;
however that brought back the issue of #1857 and so this commit goes
back to the original scenario and just adds change_table to the list
of methods which are to be recorded in the CommandRecorder. The
method_missing now delegates all calls to the underlying connection as
before.
2011-07-03 17:28:03 +01:00
José Valim
9ed063244a
Merge pull request #1949 from dmathieu/cherry-picks
...
Cherry picks for 3-1-stable
2011-07-03 07:17:18 -07:00
Damien Mathieu
a96d77aac4
all numerics should be html_safe - Closes #1935
2011-07-03 16:12:51 +02:00
Prem Sichanugrist
01c1a86566
Fix failing test on uninitialized Rails.config.assets.prefix
...
This was introduced in [2684f17a17 ] 💣
2011-07-03 15:58:33 +02:00
José Valim
91718c866b
Merge pull request #1947 from spohlenz/refactor-asset-paths-3-1
...
Refactor sprockets asset paths to allow for alternate asset environments
2011-07-02 21:15:09 -07:00
Sam Pohlenz
b494b5cf9d
Add documentation for asset_prefix and asset_environment
...
(cherry picked from commit 21344bc33b )
2011-07-03 13:40:30 +09:30
Sam Pohlenz
add63ee220
Add tests for alternate asset prefix/environment
...
(cherry picked from commit 0613f3bcdb )
2011-07-03 13:40:19 +09:30
Sam Pohlenz
b8fa5f65a6
Refactor sprockets asset paths to allow for alternate asset environments
2011-07-03 13:40:01 +09:30
José Valim
108210cffe
Merge pull request #1946 from spohlenz/fix-engine-migrations-check-3-1
...
Fix engine migrations check
2011-07-02 21:08:41 -07:00