aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/fixtures/test
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused fixturesRafael Mendonça França2014-07-1660-98/+0
| | | | These fixtures are not used in actionpack tests.
* Remove unneeded test fixtures in AVPiotr Sarnacki2013-06-2041-87/+0
|
* Fix typo in view nameCarlos Antonio da Silva2013-04-031-0/+0
| | | | Introduced in 2c22376fe04b89e8f34620139720b85a85ce3428
* partials inside directory work with `assert_template`Yves Senn2013-02-042-0/+2
| | | | | | | | | | previously when a partial was placed inside a directory (eg. '/dir/_partial'), `assert_template` did not replace the '_' prefix when looking through rendered tempaltes, which resulted in an error. I modified it to replace both, the leading '_' and the last '_' after a '/'.
* Do not generate local vars for partials without object or collectionCarlos Antonio da Silva2013-01-081-0/+1
| | | | | | | | | Previously rendering a partial without giving :object or :collection would generate a local variable with the partial name by default. This was noticed due to warnings in Ruby 2.0 of not used variables, which turned out to be the generation of not used variables inside partials that do not contain objects related to them.
* recognizes when a partial was rendered twice. Closes #3675Yves Senn2012-10-111-0/+2
|
* `assert_template` no more passing with what ever string that matches.Hugo Roque2012-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Given Im rendering an template `/layout/hello.html.erb`, assert_template was passing with any string that matches. This behavior allowed false passing like: assert_template "layout" assert_template "out/hello" Now the passing possibilities are: assert_template "layout/hello" assert_template "hello" fixing assert_template bug when template matches expected, but not ends with Cherry Pick Merge: Fixes issue #3849 assert_template false positive taking redundant test off prevening incorrect assert_template when rendering with repeated names in path updating CHANGELOG with bugfix: assert_template false passing
* Indentation should consider line number character count.Lucas Uyezu2012-08-131-0/+13
|
* Common behavior with adding formats to lookup_context for TemplateRenderer ↵Dmitry Vorotilin2012-07-187-0/+7
| | | | and PartialRenderer
* Fix assert_template assertion with :layout optionAlexey Vakhov2012-05-041-0/+2
|
* Allow access to current object_counter variable from layout when rendering ↵Carlos Antonio da Silva2012-04-291-0/+1
| | | | with partial + collection
* Allow layout rendering to access current object being rendered when using ↵Carlos Antonio da Silva2012-04-291-0/+1
| | | | partial + collection
* If partial is rendered in controller, grab format from templatePiotr Sarnacki2012-03-271-0/+1
| | | | | | | | | Previously `rendered_format` was set only based on mime types passed in Accept header, which was wrong if first type from Accept was different than rendered partial. The fix is to simply move setting rendered_format to the place where template is available and grab format from the template. If it fails we can fallback to formats passed by Accept header.
* Merge pull request #5480 from drogus/rendering-issuesJosé Valim2012-03-175-0/+5
| | | | Fix for #5440
* Adds :layout option to render :partial when a collection is given.Sergio Arbeo2012-03-061-0/+1
|
* format lookup for partials is derived from the format in which the template ↵Santiago Pastorino2012-02-221-0/+1
| | | | | | is being rendered Closes #5025 part 2
* test helpers in erb using erblest2011-11-301-0/+3
|
* fix label with block in erblest2011-11-271-0/+4
|
* Deprecate passing the template handler in the template name.José Valim2011-09-221-1/+1
| | | | | | For example, calling hello.erb is now deprecated. Since Rails 3.0 passing the handler had no effect whatsover. This commit simply deprecates such cases so we can clean up the code in later releases.
* * is not allowed in windows file names. Closes #2574 #2847Santiago Pastorino2011-09-041-0/+0
|
* Properly escape glob characters.Aaron Patterson2011-08-161-0/+1
|
* Added view template invalid name check, along with tests. No merges in commit.huskins2011-07-131-0/+1
|
* removed deprecated methods, and related tests, from ActionPackJosh Kalderimis2011-05-241-3/+0
|
* content_for should work with provide.José Valim2011-04-163-0/+9
|
* removes support for render :updateXavier Noria2011-04-135-11/+0
|
* Add a test for 'render :layout'Anton Astashov2011-02-031-0/+4
| | | | | | | | | To make sure it will show block contents if it is placed after 'render :partial' [#5557 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Make TranslationHelper#translate use the :rescue_format option in I18n 0.5.0Sven Fuchs2010-12-042-2/+0
| | | | | | Don't catch exceptions here. Instead only declare that we want exceptions to be rescued as :html, but also let users configure reactions to exceptions in I18n. Signed-off-by: José Valim <jose.valim@gmail.com>
* Tests added for rendering partial with layout, when the partial contains ↵Santiago Pastorino2010-11-133-0/+10
| | | | another render layout with block call added missing fixtures
* Fix render partial with layout and no blockCarlos Antonio da Silva2010-11-111-0/+2
| | | | | | | | When using a render :partial with :layout call, without giving a block, if the given :partial had another render :partial call, the layout was not being rendered. This commit fixes this context by storing variables before rendering the partial, so they are not overrided in any successive call to render partials down the path. All ActionPack tests are ok.
* fix rendering a partial with an array as its :object [#5746 state:resolved]Michael Koziarski2010-10-081-0/+1
| | | | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> Conflicts: actionpack/lib/action_view/render/partials.rb
* Test correct method behaviour.Emilio Tagua2010-09-291-1/+1
|
* Remove useless string line causing a warning.Emilio Tagua2010-09-281-1/+0
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* layout_for works again with objects as specified in the documentation and ↵José Valim & Carlos Antonio da Silva2010-08-111-0/+1
| | | | Rails 2.3 [#5357 state:resolved]
* fix translation test in actionpack [#4701 state:commited]Santiago Pastorino2010-05-291-1/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* translate method doesn't support arrays anymore and is optimized to be used ↵Santiago Pastorino2010-05-243-2/+1
| | | | | | with strings or symbols Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert "translation method for arrays on TranslationHelper module returns an ↵Santiago Pastorino2010-05-242-2/+2
| | | | | | | | array where values for keys of the form (.|_)html keys are html_safe" This reverts commit 05c95b5c5815c0b3ae55fda7a897922b7f3ec2c7. Signed-off-by: José Valim <jose.valim@gmail.com>
* translation method for arrays on TranslationHelper module returns an array ↵Santiago Pastorino2010-05-242-2/+2
| | | | | | | | where values for keys of the form (.|_)html keys are html_safe [#4675] Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert "Moved encoding work in progress to a feature branch."wycats2010-05-174-5/+4
| | | | This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517.
* Moved encoding work in progress to a feature branch.Jeremy Kemper2010-05-164-4/+5
| | | | This reverts commits af0d1a88157942c6e6398dbf73891cff1e152405 and 64d109e3539ad600f58536d3ecabd2f87b67fd1c.
* Significantly improved internal encoding heuristics and support.wycats2010-05-164-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * Default Encoding.default_internal to UTF-8 * Eliminated the use of file-wide magic comments to coerce code evaluated inside the file * Read templates as BINARY, use default_external or template-wide magic comments inside the Template to set the initial encoding * This means that template handlers in Ruby 1.9 will receive Strings encoded in default_internal (UTF-8 by default) * Create a better Exception for encoding issues, and use it when the template source has bytes that are not compatible with the specified encoding * Allow template handlers to opt-into handling BINARY. If they do so, they need to do some of their own manual encoding work * Added a "Configuration Gotchas" section to the intro Rails Guide instructing users to use UTF-8 for everything * Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid $KCODE value is used Also: * Fixed a few tests that were assert() rather than assert_equal() and were caught by Minitest requiring a String for the message * Fixed a test where an assert_select was misformed, also caught by Minitest being more restrictive * Fixed a test where a Rack response was returning a String rather than an Enumerable
* Check blocks are not incorrectly detected when compiling erubis templates ↵Simon Jefford2010-05-161-0/+1
| | | | | | [#4575 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* partial counters with :as [#2804 state:resolved]Jeff Kreeftmeijer2010-05-151-0/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Changed translate helper so that it doesn’t mark every translation as safe ↵Craig Davey2010-04-131-1/+1
| | | | | | HTML. Only keys with a "_html" suffix and keys named "html" are considered to be safe HTML. All other translations are left untouched. Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Expect an incompatible encoding exception when a template with a magic ↵Jeremy Kemper2010-04-085-2/+10
| | | | comment renders a partial without one and its source encoding doesn't match the default external encoding
* Expect an incompatible encoding exception when a template doesn't have a ↵Jeremy Kemper2010-04-082-2/+2
| | | | magic comment and its source encoding doesn't match the default external encoding
* scope_key_by_partial fix for Ruby 1.9 when there's virtual_path [#4202 ↵Santiago Pastorino2010-03-161-0/+1
| | | | | | state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* translation method of TranslationHelper module returns always SafeBuffer ↵Santiago Pastorino2010-03-161-0/+1
| | | | | | [#4194 status:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add deprecation notices for <% %>.Carlhuda2010-03-153-2/+5
| | | | | | | | | | | | | | | | * The approach is to compile <% %> into a method call that checks whether the value returned from a block is a String. If it is, it concats to the buffer and prints a deprecation warning. * <%= %> uses exactly the same logic to compile the template, which first checks to see whether it's compiling a block. * This should have no impact on other uses of block in templates. For instance, in <% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array, not a String, so the result is not concatenated * In two cases (#capture and #cache), a String can be returned that should *never* be concatenated. We have temporarily created a String subclass called NonConcattingString which behaves (and is serialized) identically to String, but is not concatenated by the code that handles deprecated <% %> block helpers. Once we remove support for <% %> block helpers, we can remove NonConcattingString.
* Solved a problem that prevented render :file => work in layoutsJose Fernandez2010-03-051-0/+2
| | | | Signed-off-by: wycats <wycats@gmail.com>