Commit Graph

2607 Commits

Author SHA1 Message Date
José Valim
76b6136b00 Clean up AM and AC railties. 2010-07-24 00:48:12 +02:00
José Valim
2af8fd2829 Also move asset_path to AbstractController. 2010-07-24 00:47:48 +02:00
Jeroen van Dijk and Josh Kalderimis
affeb51569 Move config_accessor :asset_host from ActionController::Base to AbstractController which fixes issues with asset_host in ActionMailer
Including:
  - Moved mailer objects in separate directory
  - Added two tests for asset_host configuration option
2010-07-24 00:27:25 +02:00
José Valim
c565f0060a No need to delegate. Simply include the whole RecordIdentifier module. 2010-07-21 11:46:38 +02:00
Piotr Sarnacki
6807b08099 Moved a few methods from RecordIdentifier to ActiveModel::Naming
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-21 11:29:58 +02:00
Piotr Sarnacki
a63566dda8 Moved PolymorphicRoutes to ActionDispatch::Routing
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-20 23:12:46 +02:00
José Valim
9df9c4bac0 Add a test for elapsed and require missing benchmark file. 2010-07-20 17:07:18 +02:00
José Valim
51d2db0a63 Add missing require to metal/streaming.rb 2010-07-20 09:56:16 +02:00
Santiago Pastorino
17600eb435 Remove unused orig_handler and unneeded parentheses 2010-07-20 04:32:08 +08:00
José Valim
70f7ba3e3b There is absolutely no need to use __send__ here. 2010-07-19 14:56:09 +02:00
José Valim
ab6ff85906 No need to create a new module in the previous commit. 2010-07-19 14:50:38 +02:00
Neeraj Singh
33c5689e2d Exceptions from views should be rescued based on the original exception. If a handler for original exception is missing then apply ActiveView::TemplateError
[#2034 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-19 14:50:38 +02:00
Benjamin Quorning
7e075e6247 Fixed many references to the old config/environment.rb and Rails::Initializer 2010-07-13 13:00:21 +02:00
Jeremy Kemper
81f398b804 Fix setting helpers_path to a string or pathname 2010-07-07 12:03:08 -07:00
José Valim
a5dda97602 Define a convention for descendants and subclasses.
The former should be symmetric with ancestors and include all children. However, it should not include self since ancestors + descendants should not have duplicated. The latter is symmetric to superclass in the sense it only includes direct children.

By adopting a convention, we expect to have less conflict with other frameworks, as Datamapper. For this moment, to ensure ActiveModel::Validations can be used with Datamapper, we should always call ActiveSupport::DescendantsTracker.descendants(self) internally instead of self.descendants avoiding conflicts.
2010-07-05 13:01:27 +02:00
Wincent Colaiuta
75b32a69a1 Fixes for "router" and "routes" terminology
Commit f7ba614c2d improved the internal consistency of the different
means of accessing routes, but it introduced some problems at the level
of code comments and user-visible strings.

This commit applies fixes on three levels:

Firstly, we remove or replace grammatically invalid constructs such as
"a routes" or "a particular routes".

Secondly, we make sure that we always use "the router DSL" or "the
router syntax", because this has always been the official terminology.

Finally, we make sure that we only use "routes" when referring to the
application-specific set of routes that are defined in the
"config/routes.rb" file, we use "router" when referring on a more
abstract level to "the code in Rails used to handle routing", and we use
"routing" when we need an adjective to apply to nouns such as
"url_helpers. Again this is consistent with historical practice and
other places in the documentation.

Note that this is not a sweep over the entire codebase to ensure
consistent usage of language; it is just a revision of the changes
introduced in commit f7ba614c2d.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-03 22:42:31 +02:00
Piotr Sarnacki
f7ba614c2d Unify routes naming by renaming router to routes
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-02 01:51:03 +02:00
Jeremy Kemper
f8011e67b0 Use caller for helpers_dir deprecation warnings 2010-06-28 14:48:44 -07:00
Bruno Michel
2002e5877e Strip_tags never ending attribute should not raise a TypeError [#4870 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-28 11:40:27 +02:00
José Valim
7eb5766bd1 Small changes to responder:
* resources is always an array;
* Lazy retrieve request and formats;
* Alias api_location and navigation_location to resource_location, making easier to change its behavior without affecting each other and without a need to reimplement any of the behavior methods.
2010-06-26 15:48:47 +02:00
José Valim
6788db824a Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved] 2010-06-24 13:23:43 +02:00
Michael Lovitt
49f52c3d91 Sessions should not be created until written to and session data should be destroyed on reset.
[#4938]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-23 11:56:35 -07:00
knapo
995b1a243c Fix controller_name for non default controller paths [#4901 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 01:37:52 +02:00
David Chelimsky
0576ec4ddd Add support for specifying locals in view tests with assert template [#4927 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 14:51:22 +02:00
Xavier Noria
207fa59675 Merge remote branch 'rails/master'
Conflicts:
	actionpack/lib/abstract_controller/base.rb
2010-06-20 23:13:19 +02:00
Andrew White
ed3f042e99 Make polymorphic_url and scaffolding work with uncountable resources [#3930 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:15:41 +02:00
wycats
f368b21cb6 Remove a relic of #request being in RackDelegation 2010-06-19 08:19:15 -07:00
Evgeniy Dolzhenko
ef404c771d Fix a bunch of minor spelling mistakes 2010-06-15 12:04:22 +04:00
Xavier Noria
f17159b029 edit pass: the names of Rails components have a space, ie, "Active Record", not "ActiveRecord" 2010-06-14 23:22:04 +02:00
Evgeniy Dolzhenko
ccf9577aee Fix a bunch of minor spelling mistakes 2010-06-11 14:15:34 +04:00
José Valim
b67ec8ba20 class_attribute is not a direct replacement of class_inheritable_*.
If you are setting a hash or an array in class_attribute or you need
to freeze it, to ensure people won't modify it in place or you need
to dup it on inheritance.
2010-06-10 19:39:09 +02:00
Neeraj Singh
db23a95a61 cache_sweeper yields blank output
[#3914 state:open]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-08 23:20:04 +02:00
wycats
d6953cbfd3 regular expressions are usually ASCII-encoded, so force_encoding the content of a Node to the encoding of the regular expression is wrong. 2010-06-07 18:06:08 -04:00
wycats
eebac02606 Make named helpers unprotected without becoming actions [#4696 state:resolved] 2010-06-07 15:29:55 -04:00
Jeremy Kemper
9f93de9d3d Reset request.parameters after assigning params for functional tests 2010-06-06 12:07:40 -07:00
wycats
ff4c218095 Memoizing methods on request means we need to clear them out on recycle! 2010-06-04 20:11:05 -07:00
José Valim
71375c8936 Add an asset_host accessor for consistency. 2010-06-02 14:53:56 -07:00
David Heinemeier Hansson
631dc61885 Extract assets paths and make them available to Action Mailer as well 2010-06-02 16:49:02 -05:00
wycats
ffe001f19d Changes made while working on upgrading cells to Rails 3 2010-06-02 22:56:41 +02:00
José Valim
9a93844aba Add :only and :except to controllers MiddlewareStack. This allows
you to do the following:

  class PostsController < ApplicationController
    use AutheMiddleware, :except => [:index, :show]
  end
2010-05-30 15:53:14 +02:00
José Valim
59d1c418be Fix a bug where responders were not working properly on method override. 2010-05-24 13:12:40 +02:00
Jeremy Kemper
a06e9b4602 Ruby 1.9: helper path may be a pathname, so convert to a string before quoting for regexp 2010-05-16 18:03:27 -07:00
David Chelimsky
849ab92942 Eliminate false positives when passing symbols to assert_template
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-03 13:46:12 +02:00
Justin George
731d4392e4 Change event namespace ordering to most-significant first [#4504 state:resolved]
More work still needs to be done on some of these names
(render_template.action_view and render_template!.action_view particularly)
but this allows (for example) /^sql/ to subscribe to all
the various ORMs without further modification

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-02 22:45:54 +02:00
rick
8d236ccb84 add HTTP Token Authorization support to complement Basic and Digest Authorization. 2010-04-30 07:46:30 -07:00
Neeraj Singh
d793d30776 ActionCachingTestController rescues from all exceptions. Making sure that all the tests check for valid response. [#4468 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-29 12:48:34 +02:00
David Chelimsky
176fbfd66f extract ActionController::TestCase::Behavior
- this makes it possible for other test frameworks
  to hook into testing facilities provided by Rails
  without having to subclass AC::TestCase.

[#4474 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-26 09:52:38 +02:00
David Chelimsky
864bd9c21f allow unsubscribe by name or subscription [#4433 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-24 22:06:24 -07:00
José Valim
81fb742488 Always downstream given options in :json, :xml and :js renderers and add tests for it. 2010-04-22 12:12:38 +02:00
José Valim
4163ccec23 Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests. 2010-04-22 12:00:13 +02:00