Commit Graph

49 Commits

Author SHA1 Message Date
Yehuda Katz + Carl Lerche
d8f352e970 Rename ActionView::Template::Path ActionView::Resolver 2009-06-17 15:32:55 -07:00
Yehuda Katz + Carl Lerche
4fad953f90 Fixing pending tests and fixed some formats / partial rendering semantics 2009-06-17 12:54:19 -07:00
Yehuda Katz + Carl Lerche
86fc43fd58 ActionPack components should no longer have undeclared dependencies.
* Tests can be run in isolation
  * Dependencies added
  * A few tests modified to avoid depending on AS deps 
    not depended on my files they were testing
2009-06-08 13:34:07 -07:00
Jeremy Kemper
94911c7af7 Ensure ERB source begins with the encoding comment 2009-06-01 12:34:08 -07:00
Jeremy Kemper
5ec2c7dc29 Ruby 1.9: ERB template encoding using a magic comment at the top of the file 2009-05-28 17:12:48 -05:00
Yehuda Katz + Carl Lerche
cecafc52ee Refactor ActionView::Template
ActionView::Template is now completely independent from template
  storage, which allows different back ends such as the database.
  ActionView::Template's only responsibility is to take in the
  template source (passed in from ActionView::Path), compile it,
  and render it.
2009-04-27 11:49:11 -07:00
Yehuda Katz + Carl Lerche
0a132c2fe1 Refactor ActionView::Path
* Decouple from ActionController and ActionMailer
  * Bring back localization support.
  * Prepare to decouple templates from the filesystem.
  * Prepare to decouple localization from ActionView
  * Fix ActionMailer to take advantage of ActionView::Path
2009-04-22 17:24:41 -07:00
Carl Lerche & Yehuda Katz
3c1187699a Makes rails-dev-boost work again 2009-04-14 18:32:31 -07:00
Carl Lerche & Yehuda Katz
906aebceed Bring abstract_controller up to date with rails/master
Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list
of commits that could not be applied cleanly or are obviated with the
abstract_controller refactor. They all need to be revisited to ensure
that fixes made in 2.3 do not reappear in 3.0:

2259ecf368e6a6715966f69216e3ee86bf1a82a7
AR not available
  * This will be reimplemented with ActionORM or equivalent

06182ea02e92afad579998aa80144588e8865ac3
implicitly rendering a js response should not use the default layout
[#1844 state:resolved]
  * This will be handled generically

893e9eb99504705419ad6edac14d00e71cef5f12
Improve view rendering performance in development mode and reinstate
template recompiling in production [#1909 state:resolved]
  * We will need to reimplement rails-dev-boost on top of the refactor;
    the changes here are very implementation specific and cannot be
    cleanly applied. The following commits are implicated:

      199e750d46c04970b5e7684998d09405648ecbd4
      3942cb406e1d5db0ac00e03153809cc8dc4cc4db
      f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690
      e3b166aab37ddc2fbab030b146eb61713b91bf55
      ae9f258e03c9fd5088da12c1c6cd216cc89a01f7
      44423126c6f6133a1d9cf1d0832b527e8711d40f

0cb020b4d6d838025859bd60fb8151c8e21b8e84
workaround for picking layouts based on wrong view_paths
[#1974 state:resolved]
  * The specifics of this commit no longer apply. Since it is a two-line
    commit, we will reimplement this change.

8c5cc66a831aadb159f3daaffa4208064c30af0e
make action_controller/layouts pick templates from the current instance's
view_paths instead of the class view_paths [#1974 state:resolved]
  * This does not apply at all. It should be trivial to apply the feature
    to the reimplemented ActionController::Base.

87e8b162463f13bd50d27398f020769460a770e3
fix HTML fallback for explicit templates [#2052 state:resolved]
  * There were a number of patches related to this that simply compounded
    each other. Basically none of them apply cleanly, and the underlying
    issue needs to be revisited. After discussing the underlying problem
    with Koz, we will defer these fixes for further discussion.
2009-04-13 15:18:45 -07:00
Cezary Baginski
44423126c6 Additional template render test for backup files [#2367 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-04-02 11:58:29 -05:00
Joshua Peek
ea8488caef Fixed simplified render with nested models [#2042 state:resolved] 2009-03-07 14:05:18 -06:00
Mike Gunderloy
dcd9c7f58e Fix spelling in test name.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-02-28 15:35:03 +00:00
thedarkone
85df4841dd Template without a known template handler should only be reachable through its exact path. [#2027 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-24 10:41:45 -06:00
thedarkone
3942cb406e Port fast reloadable templates from rails-dev-boost. 2009-02-12 13:04:12 -06:00
Andrew White
893e9eb995 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-09 14:20:30 -06:00
José Valim
50f51ff950 Render implicit html template when xhr request now supports localization [#1886 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-07 11:37:02 -06:00
José Valim
24f2e676f7 Added support to dashed locales in templates localization [#1888 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-06 23:23:50 -06:00
Eugene Pimenov
b1c1e3deb7 Ruby 1.9 compat: change encoding of action_view/renderable to utf-8, so erb templates can use utf-8 properly
[#1881 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-02-06 11:03:41 -08:00
Yehuda Katz
9744f687cc Add support for pending 2009-02-02 11:49:32 -08:00
Jeremy Kemper
bc94061156 Fix unsorted array comparison 2009-01-31 10:56:16 -08:00
Yehuda Katz
3030bc90c9 Merge commit 'rails/3-0-unstable'
Conflicts:

	actionpack/lib/action_controller/base.rb
	actionpack/lib/action_dispatch/http/mime_type.rb
	actionpack/lib/action_dispatch/http/request.rb
	actionpack/lib/action_view/base.rb
	actionpack/lib/action_view/paths.rb
	actionpack/test/controller/session/cookie_store_test.rb
	actionpack/test/dispatch/rack_test.rb
	actionpack/test/dispatch/request_test.rb
2009-01-30 11:30:27 -08:00
Joshua Peek
a98cd7ca9b Add localized templates
# Default locale
  app/views/messages/index.html.erb

  # I18n.locale is set to :da (Danish)
  app/views/messages/index.da.html.erb
2009-01-25 22:51:21 -06:00
Yehuda Katz
eb9af20b7c Begin unifying the interface between ActionController and ActionView 2009-01-22 16:18:10 -06:00
Joshua Peek
558ab327b7 Clean up view path cruft and split path implementations into Template::Path and Template::EagerPath 2008-12-29 19:27:19 -06:00
Joshua Peek
148aff2097 Set template_format to html inside rjs templates so renders within it default to html. 2008-12-04 17:20:51 -06:00
Joshua Peek
9fccf72725 fixed template recompile issue with previous commit and add some better tests so we can make sure it doesn't happen again 2008-11-28 14:31:54 -06:00
Joshua Peek
9fc23745f1 Reinstate "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading." 2008-11-28 11:18:28 -06:00
David Heinemeier Hansson
5fa0457542 Revert "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading.
This reverts commit 4d910b033379727e5e7355590c50c72fc75e56db.
2008-11-27 21:04:24 +01:00
Joshua Peek
4d910b0333 Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache. 2008-11-26 20:54:47 -06:00
Joshua Peek
bc4d05b244 A back support for legacy TemplateHandler#render API 2008-11-23 13:57:01 -06:00
David Heinemeier Hansson
130fe74d17 Changed the default of ActionView#render to assume partials instead of files when not given an options hash [DHH] 2008-11-19 14:00:16 +01:00
Joshua Peek
ec38c84ce1 Dup local assigns for partial collections so nil values doesn't get overwritten [#1250 state:resolved] 2008-10-30 15:07:47 -05:00
Ryan Bates
4ad5aa9a39 Ensure @content_for_* is checked before yielding to block in render :layout [#8994 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-10-28 17:31:33 -05:00
Joshua Peek
ac50ee0edf Track rendered templates in stack so the current template can always be accessed. Added ActionView::Base#template to access the template object. 2008-10-28 11:06:08 -05:00
Claudio Poli
5f83e1844c Fixed missing template paths on exception [#1082 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-09-20 22:57:45 -05:00
Ryan Bates
9a5ffaa01e Ensure :partial => @collection and :collection => @collection behaves same. [#884 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-22 18:15:53 +01:00
Ryan Bates
a8ece12fe2 Return nil instead of a space when passing an empty collection or nil to 'render :partial' [#791 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-19 19:09:04 -05:00
Joshua Peek
3b9324e62f Fix rendering partials at the top level [#795 state:resolved] 2008-08-13 19:15:35 -05:00
Cameron Yule
2faf35cea9 Added tests for partial collection counters [#766 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-09 10:48:56 -05:00
Joshua Peek
d2ccb852d4 Removed lagacy TemplateHandler#render API. Left in a legacy TemplateHandler and Compilable stub so plugins will not have to change anything. 2008-07-18 16:00:20 -05:00
Joshua Peek
30204c4e66 Set global ActionController::Base.view_paths for test cases 2008-07-12 14:11:51 -05:00
Joshua Peek
6ebdd0e32b Changed ActionView::TemplateHandler#render API method signature to render(template, local_assigns = {}) 2008-07-11 15:40:41 -05:00
Joshua Peek
01637796d7 Revert "Moved TemplateHandlers to Base"
This reverts commit 42d215a925a228778e43f7040f03ad8f3eb5341c.

Conflicts:

	actionpack/lib/action_view/inline_template.rb
	actionpack/lib/action_view/template.rb
2008-07-03 21:09:37 -05:00
Joshua Peek
42d215a925 Moved TemplateHandlers to Base 2008-07-03 12:48:00 -05:00
Joshua Peek
3b3790a435 Deprecate :use_full_path render option. The supplying the option no longer has an effect. 2008-07-02 21:38:58 -05:00
Pratik Naik
267d3964eb Make sure render :collection doesnt set nil local when :as is absent 2008-07-02 17:19:41 +01:00
Pratik Naik
2b43620e3c Add :as option to render a collection of partials with a custom local variable name. [#509 state:resolved] [Simon Jefford, Pratik Naik] 2008-07-02 16:40:42 +01:00
Joshua Peek
339491a6b3 Set precompiled fixture load path constant to speed up tests 2008-06-25 15:24:12 -05:00
Joshua Peek
6f5327013d Consolidate CustomHandlerTest, TemplateFileTest, and TemplateObjectTest and test them at a higher level of abstraction in ViewRenderTest. 2008-06-25 05:49:38 -05:00