Commit Graph

128 Commits

Author SHA1 Message Date
Piotr Sarnacki
79bd92b783 Refactor ActionMailer to not use hide_actions 2010-09-03 22:59:11 +02:00
Piotr Sarnacki
4131a2d804 Move ActionController::Railties::RoutesHelpers and ActionMailer::Railties::RoutesHelper to AbstractController::Railties::RoutesHelpers 2010-09-03 22:59:11 +02:00
Piotr Sarnacki
6c95e0f879 Add mounted_helpers to routes
mounted_helpers are a bit similar to url_helpers. They're automatically
included in controllers for Rails.application and each of mounted
Engines. Mounted helper allows to call url_for and named helpers for
given application.

Given Blog::Engine mounted as blog_engine, there are 2 helpers defined:
app and blog_engine. You can call routes for app and engine using those
helpers:

app.root_url
app.url_for(:controller => "foo")
blog_engine.posts_path
blog_engine.url_for(@post)
2010-09-03 22:59:07 +02:00
Jesse Storimer
730af48963 Ensure that inherited helper_methods are available after calling clear_helpers [#5348 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-28 18:07:01 -03:00
José Valim
66ef92272c Add clear_helpers as a way to clean up all helpers added to this controller, maintaing just the helper with the same name as the controller. 2010-08-26 16:07:54 -03:00
Joost Baaij
e9eaae1a05 fixed capitalization 2010-08-25 19:51:20 +02:00
Joost Baaij
eaeda503e8 change rdoc to conform to api guidelines 2010-08-25 18:57:27 +02:00
Santiago Pastorino
b451de0d6d Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
Piotr Sarnacki
84f0a0bc30 Reload action_methods in AbstractController after defining new method.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-04 14:44:34 -03: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
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
José Valim
033e0a041f ActiveRecord and ActionPack now use the new descendants implementation. 2010-06-19 17:15:21 +02:00
Alan Harper
566967eaf3 Missing method error doesn't specify which controller it is missing from [#4436 state:resolved]
The error page shown when the method you are requesting on a controller
doesn't specify which controller the method is missing from

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-10 20:04:37 +02: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
David Heinemeier Hansson
4a6290bb38 Missed the extraction 2010-06-03 23:32:12 +10:00
wycats
e57dbfe6af Changes made while working on upgrading cells to Rails 3 2010-06-03 23:32:12 +10:00
Rohit Arondekar
e3b04f3ce9 Minor typo fix in callbacks.rb of abstract_controller 2010-06-03 23:32:08 +10:00
Santiago Pastorino
aacf2581cd refactor evals and adds some __FILE__ and __LINE__
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-20 15:18:57 +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
Carl Lerche
ac015b1d07 Revert "Avoid deprecation warnings and potential TypeErrors [#4404 state:resolved]"
Revert "protected instance variables added to the deprecated config accessor

This reverts commit 4bce5ba600 and 0ee2d3c89a.
2010-04-16 15:39:00 -07:00
Nicolas Sanguinetti
4bce5ba600 Avoid deprecation warnings and potential TypeErrors [#4404 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2010-04-15 14:51:25 +01:00
José Valim
3fc609ee41 Fix ActionMailer test broken in 99d5459921 2010-04-12 10:50:27 +02:00
wycats
209fb5190b render_to_string should have the identical signature as render 2010-04-04 19:58:15 -07:00
wycats
0aa0c37b59 Well that was a bust 2010-03-18 22:55:44 -07:00
wycats
995f57033f We seem to have removed the URL helpers from ActionView subclasses... 2010-03-18 22:21:25 -07:00
Carlhuda
a5d80f84d2 Each controller class has it's own view context subclass. This removes the need for ActionView::Base.for_controller 2010-03-18 18:14:54 -07:00
Carlhuda
1dacc19702 Return a valid Rack response from bare ActionController::Metal 2010-03-18 17:32:53 -07:00
Carlhuda
edb5991a14 Make render :partial, :layout consistent between AC and AV 2010-03-18 16:55:32 -07:00
Carlhuda
71c9337f45 All tests pass without memoizing view_context 2010-03-18 15:52:43 -07:00
Carlhuda
523d0f3700 Remove caching's dependency on view_context. Also, make it so that the layout is always rendered the same way (so that layout dependencies on the action actually being rendered aren't masked on the first render) 2010-03-18 14:55:29 -07:00
Carlhuda
d8c7efece6 Make action_has_layout? non-private 2010-03-18 14:55:29 -07:00
José Valim
21dcbb17de Ensure json is loaded before using responders. 2010-03-17 23:09:28 +01:00
Carlhuda
6416a35f4b Remove unneeded AV::Base and AV::Template monkey-patches 2010-03-17 14:29:18 -07:00
wycats
cd9ffd11e1 Eliminate warnings for AM on 1.8 2010-03-16 23:24:00 -07:00
José Valim
f2c0a353ae Finish cleaning up rendering stack from views and move assigns evaluation to controller (so plugins and/or controllers can overwrite just one method). 2010-03-12 20:39:53 +01:00
José Valim
2a12686832 Allow anything that responds to render to be given as :template and use find_template instead of find in views. 2010-03-12 14:25:10 +01:00
José Valim
07cf49aadf Optimize and clean up how details key get expired. 2010-03-10 22:13:29 +01:00
José Valim
00d6271d2b Clean up the API required from ActionView::Template. 2010-03-09 13:12:11 +01:00
José Valim
8f082ff421 Clean LookupContext API. 2010-03-08 23:25:16 +01:00
José Valim
bdf5096816 Move details to lookup_context and make resolvers use the cache key. 2010-03-08 20:39:15 +01:00
José Valim
67a6725bf9 Move ViewPaths module to its own file. 2010-03-08 16:50:10 +01:00
José Valim
68cda695da Speed up performance in resolvers by adding fallbacks just when required. 2010-03-08 16:32:40 +01:00
José Valim
44ebab96da Rename Template::Lookup to LookupContext. 2010-03-08 15:19:03 +01:00
José Valim
ea68fe59c6 More refactoring on the views side of rendering. 2010-03-08 14:46:57 +01:00
José Valim
0a85380966 Finally moved the find template logic to the views. 2010-03-08 11:32:01 +01:00
José Valim
34b2180451 More refactoring. Split _normalize_args and _normalize_options concerns. 2010-03-08 03:23:23 +01:00
José Valim
4bae77a89b More cleanup on the layouts side. 2010-03-08 02:58:16 +01:00
José Valim
ffd8d753f1 Move layout lookup to views. 2010-03-08 02:04:18 +01:00
José Valim
c7564d74e8 Added template lookup responsible to hold all information used in template lookup. 2010-03-07 19:41:58 +01:00