Commit Graph

26475 Commits

Author SHA1 Message Date
Vijay Dev
7eb596cddd Merge branch 'master' of github.com:lifo/docrails 2011-12-06 23:05:43 +05:30
Vijay Dev
89647a305f Revert "Added link to ActiveResource::Base documentation"
This reverts commit 03d4388786.

Conflicts:

	activeresource/README.rdoc

Reason: I don't think this is absolutely necessary given the
fact that such links won't work in both GitHub and Rails API
at the same time. See links in rails/README.rdoc and rails/Rakefile
for some hackery that needs to be done to get such links work in
both places.
2011-12-06 22:58:23 +05:30
Vijay Dev
078b4b54a6 use textile syntax in links 2011-12-06 22:51:07 +05:30
Vijay Dev
d1bf7db55d rxml and rhtml are no longer searched for source code annotations 2011-12-06 22:50:37 +05:30
Vijay Dev
cec909d938 copy edits in layouts guide, change links to be relative 2011-12-06 22:49:22 +05:30
Santiago Pastorino
9be2353fac Sync AP CHANGELOG with 3-1-stable 2011-12-06 11:28:05 -02:00
Santiago Pastorino
e58d663f3e Merge pull request #3428 from adrianpike/asset_path_conflicts
Issue #3427 - asset_path_conflicts
2011-12-06 05:16:24 -08:00
José Valim
f0f0e59c10 Ensure length validator also works on 1.8.7. 2011-12-06 14:13:44 +01:00
sandeepravi
b5e333d5b0 Added link to ActiveResource::Base documentation 2011-12-06 18:09:42 +05:30
sandeepravi
03d4388786 Added link to ActiveResource::Base documentation 2011-12-06 18:03:41 +05:30
Thomas von Deyen
7e12aa7424 Added git --rebase option for pulling rails master 2011-12-06 13:26:57 +01:00
sandeepravi
bc994470c4 Added wiki link to REST 2011-12-06 17:50:16 +05:30
José Valim
d722eb3b04 Merge pull request #3876 from tvdeyen/string_as_url_for_expire_action
Allow string as url for expire_action
2011-12-06 04:11:59 -08:00
Thomas von Deyen
0da31a1839 Allowing string as url argument for expire_action 2011-12-06 13:05:15 +01:00
sandeepravi
8a67b632ae Added wiki link for REST 2011-12-06 17:22:48 +05:30
José Valim
81fec5dfc4 Merge pull request #3872 from marcandre/i18n_key
ActiveModel::Name#i18n_key: Fix doc and add tests
2011-12-06 00:41:43 -08:00
José Valim
1ee832b2d8 Merge pull request #3873 from iangreenleaf/no_default_tokenizer
Don't tokenize string when counting characters
2011-12-06 00:41:05 -08:00
Marc-Andre Lafortune
d834755dad ActiveModel::Name#i18n_key: Fix doc and add tests 2011-12-05 22:02:53 -05:00
Aaron Patterson
a2f7c1dc67 make method signatures match the superclass signature 2011-12-05 18:36:27 -08:00
Aaron Patterson
b942ae836e return value is never tested, so stop calling presence 2011-12-05 18:36:08 -08:00
Adrian Pike
25007ad3fb Let's do the same trick for asset_path that we do for [image,javascript,stylesheet]_path to avoid namespace conflicts on named routes.
Closes #3427
2011-12-05 17:17:39 -08:00
Aaron Patterson
8aa7b8695d Quitoting the table name before querying. 2011-12-05 14:20:14 -08:00
Aaron Patterson
988061ddb8 Merge pull request #3867 from jadeforrest/master
Increase performance for table_exists?
2011-12-05 14:15:50 -08:00
Uģis Ozols
d645aed91f Use do end for multiline block. 2011-12-05 23:11:20 +02:00
José Valim
38185f670e Merge pull request #3866 from ugisozols/master
Remove .rxml, .rjs and .rhtml from source annotation regexp.
2011-12-05 12:31:37 -08:00
Uģis Ozols
d2f46d053f Remove .rxml, .rjs and .rhtml from source annotation regexp. 2011-12-05 21:24:09 +02:00
Jade Rubick
73a331c2ac Speed up table_exists? for databases with a large number of tables
At New Relic, we have hundreds of thousands of tables, and our migrations took 30 minutes without this similar patch. This cuts it down to a more reasonable amount of time.

The rescue false part is ugly, but necessary as far as I can tell. I don't know of a cross-database statement you can make that will work without trapping errors.
2011-12-05 11:20:10 -08:00
Uģis Ozols
1c65962b9d .rhtml and .rxml was removed in Rails 3. 2011-12-05 20:40:48 +02:00
José Valim
f6cc4fd7a2 Merge pull request #3861 from andyjeffries/master
Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)
2011-12-05 08:48:25 -08:00
José Valim
168c088735 Merge pull request #3863 from lest/params-wrapper-inflections
use classify in ParamsWrapper to derive model name from controller name
2011-12-05 08:46:10 -08:00
lest
1f0e21ce30 use classify in ParamsWrapper to derive model name from controller name 2011-12-05 19:15:36 +03:00
Andy Jeffries
71d769e3b5 Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match) 2011-12-05 15:41:38 +00:00
José Valim
d4964b3386 Namespaced attribute lookup now works as 'model/association.attribute'. 2011-12-05 15:39:41 +01:00
Sergey Parizhskiy
0bcac982b6 Merge branch 'master' of github.com:lifo/docrails 2011-12-05 16:25:25 +02:00
Sergey Parizhskiy
c9cc535d2b changes in the way of how the stylesheets_link_tag works 2011-12-05 16:25:02 +02:00
José Valim
2985151000 Merge pull request #3859 from kuroda/human_attribute_name
Fix human_attribute_name to handle names with dots
2011-12-05 06:09:33 -08:00
Tsutomu Kuroda
dff19f7be2 Fix human_attribute_name to handle names with dots
Nested I18n namespace lookup under activerecord.models is deprecated now (c19bd4f).
But when a model uses accepts_nested_attributes_for, its Errors object can have
an attribute name with "addresses.street" style. In this case, the dots should be
substituted with slashes so that we can provide the translation under the
"activemodel.attributes.person.addresses/street" key.
2011-12-05 22:57:47 +09:00
Jason Noble
c921ba97b8 Remove redundant or 2011-12-05 05:22:13 -07:00
Xavier Noria
be482bd6d6 Merge pull request #3858 from Overbryd/redirect_to_url_with_network_path_reference
redirect_to url with network path reference: Do not escape forward slashes within a curly regexp
2011-12-05 02:55:08 -08:00
Overbryd
9fb5ee8beb Minor enhancement by not unnecessarely escaping forward slashing within a curly regexp and by mentoining the protocol relative scheme in the internal comment 2011-12-05 11:48:05 +01:00
José Valim
446bdb449d Merge pull request #3857 from Overbryd/redirect_to_url_with_network_path_reference
Fix for redirect_to to respect urls with a network path reference like "//asset.host.com/resources/1235"
2011-12-05 02:30:21 -08:00
Overbryd
e31c4ace97 Fix for redirect_to to respect urls with a network path reference like "//asset.host.com/resources/1235" see issue #3856 2011-12-05 11:19:48 +01:00
Ian Young
5ff71ac9f8 Don't tokenize string when counting characters 2011-12-04 23:20:54 -08:00
José Valim
cf6ccf0ebd Merge pull request #3854 from exviva/validates_associated_marked_for_destruction
Do not validate associated records marked for destruction
2011-12-04 15:57:13 -08:00
Olek Janiszewski
a8134aceb3 Do not validate associated records marked for destruction
The main reason for this change is to fix a bug where
`validates_associated` would prevent `accepts_nested_attributes_for`
with `allow_destroy: true` from destroying invalid associated records.
2011-12-05 00:19:21 +01:00
Jon Leighton
4ded0dd2de Merge pull request #3851 from ebeigarts/fix_sequence_name
Fix sequence name with abstract classes.
2011-12-04 15:19:17 -08:00
Xavier Noria
4e74bd194b moves some auto explain logic to the subscriber [José Valim & Xavier Noria] 2011-12-04 13:53:26 -08:00
Xavier Noria
7f3ce35e19 simplifies ActiveRecord::ExplainSubscriber [José Valim & Xavier Noria] 2011-12-04 13:27:03 -08:00
Xavier Noria
d59bfeb119 Merge branch 'explain' 2011-12-04 11:55:53 -08:00
Xavier Noria
cfeac38e2b implements a much faster auto EXPLAIN, closes #3843 [José Valim & Xavier Noria]
This commit vastly reduces the impact of auto
explain logging when enabled, while keeping
a negligible cost when disabled.

The first implementation was based on the idea
of subscribing to "sql.active_record" when
needed, and unsubscribing once done. This is
the idea behind AR::Relation#explain. Subscribe,
collect, unsubscribe.

But with the current implementation of notifications
unsubscribing is costly, because it wipes an internal
cache and that puts a penalty on the next event.

So we are switching to an approach where a long-running
subscriber is listening. Instead of collecting the
queries with a closure in a dedicated subscriber, now
we setup a thread local.

If the feature is disabled by setting the threshold
to nil, the subscriber will call a method that does
nothing. That's totally cheap.
2011-12-04 11:52:12 -08:00