aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
Commit message (Collapse)AuthorAgeFilesLines
...
* I18n: use I18n for select helpers' prompt textAkira Matsuda2009-08-261-0/+22
| | | | | | [#2252 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Got tests to pass with some more changes.Yehuda Katz2009-08-153-0/+10
| | | | | | | | | | | | | | | | * request.formats is much simpler now * For XHRs or Accept headers with a single item, we use the Accept header * For other requests, we use params[:format] or fallback to HTML * This is primarily to work around the fact that browsers provide completely broken Accept headers, so we have to whitelist the few cases we can specifically isolate and treat other requests as coming from the browser * For APIs, we can support single-item Accept headers, which disambiguates from the browsers * Requests to an action that only has an XML template from the browser will no longer find the template. This worked previously because most browsers provide a catch-all */*, but this was mostly accidental behavior. If you want to serve XML, either use the :xml format in links, or explicitly specify the XML template: render "template.xml".
* More cleanup of ActionView and reduction in need for blocks in some cases:Yehuda Katz2009-08-151-1/+1
| | | | | | | | * only one of partial_name or :as will be available as a local * `object` is removed * Simplify _layout_for in most cases. * Remove <% render :partial do |args| %> * <% render :partial do %> still works fine
* Clean up ActionView some:Yehuda Katz2009-08-151-11/+23
| | | | | | | | | | * Call _evaluate_assigns_and_ivars at the two entry points so we don't have to do a check at every render. * Make template.render viable without having to go through a wrapper method * Remove old TemplateHandler#render(template, local_assigns) path so we don't have to set self.template every time we render a template. * Move Template rescuing code to Template#render so it gets caught every time. * Pull in some tests from Pratik that test render @object in ActionView
* Introduce grouped_collection_select helper.codeape2009-08-091-0/+34
| | | | | | [#1249 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make sure link_to generates the form with the specified :href if any [#2254 ↵Max Lapshin2009-08-101-0/+8
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixed to_label_tag to accept id attribute without changing for attribute ↵Matt Duncan2009-08-091-0/+16
| | | | | | [#2660 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix that RedCloth shouldn't be required to run testsJeremy Kemper2009-08-091-12/+18
|
* Support passing Redcloth options via textilize helper [#2973 state:resolved]rizwanreza2009-08-091-0/+17
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Use response_body rather than performed?Yehuda Katz2009-08-091-1/+1
|
* Don't call additional methods on builders passed to the atom_feed helper.Michael Koziarski2009-08-091-0/+29
| | | | | | Additionally, actually test that the atom_feed helper works with :xml as an option. [#1836 state:committed]
* Allow content_tag options to take an array [#1741 state:resolved] ↵rizwanreza2009-08-081-0/+13
| | | | | | | | | | [rizwanreza, Nick Quaranto] Example: content_tag('p', "limelight", :class => ["song", "play"]) # => <p class="song play">limelight</p> Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Allow radio buttons to work with booleans.José Valim2009-08-081-0/+10
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add :include_blank option for select_tag [#1987 status:resolved]rizwanreza2009-08-081-0/+12
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix number_to_precision rounding error [#2071 state:resolved]wmoxam2009-08-081-0/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Make sure javascript_include_tag/stylesheet_link_tag does not append ".js" ↵Matthew Rudy Jacobs2009-08-051-2/+6
| | | | | | or ".css" onto external urls [#1664 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix tag helpers so that all HTML element boolean attributes render according ↵Marc Love2009-07-301-4/+4
| | | | | | to the specs. Added all boolean attributes listed in the XHTML 1.0 specs (http://www.w3.org/TR/xhtml1/guidelines.html) and HTML 5 specs (http://www.whatwg.org/specs/web-apps/current-work). HTML 5 boolean attribute rendering was broken in commit 1e2d7229602f467cfdc0ef606b5ef8a5566a1501 / [#2864 state:resolved]. Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Add support for error_messages_for(@obj)Yehuda Katz2009-07-282-2/+15
|
* AMo conversion helperJoshua Peek2009-07-217-17/+33
|
* Rename ActiveRecordHelper to ActiveModelHelperYehuda Katz2009-07-202-2/+2
|
* Finish convert_to_object updatesYehuda Katz2009-07-201-0/+6
|
* Update some tests and add a to_model to form helpersYehuda Katz2009-07-203-6/+7
|
* Define ActiveModel API ComplianceYehuda Katz2009-07-206-18/+23
| | | | | | - Define to_model on AR - Define to_model on ActiveModel::APICompliant - Update test fixtures to be API Compliant - Start using to_model in AP
* Move default_form_builder to ActionView so it'll work in environments not ↵Yehuda Katz2009-07-191-3/+3
| | | | using ActionView::Base
* Separate ActionView::Context so something else can easily be made into an AV ↵Yehuda Katz2009-07-191-1/+1
| | | | context
* Adds a audio_tag helper for the HTML5 audio tag. Fixed video_path docs. HTML ↵Emilio Tagua2009-07-071-4/+36
| | | | | | attributes values should be true or false not attribute's name. [#2864 state:resolved] Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local>
* My suggestion to fix ticket 2401 [#2401 state:resolved]Jarl Friis2009-07-021-0/+92
| | | | Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
* Fixes a number of tests that inexplicably didn't fail when we committed the ↵Yehuda Katz + Carl Lerche2009-07-024-12/+12
| | | | original patch
* Adds a video_tag helper for the HTML5 video tag (similar to how the ↵Tieg Zaharia2009-07-021-2/+41
| | | | | | image_tag works) (tests included); removes a duplicate test line for image_tag; adds boolean attributes for video tag to tag()'s boolean attributes Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
* Make text_area_tag escape contents by default.Chris Mear2009-06-271-0/+12
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2015 state:committed]
* Handle missing javascript/stylesheets assets by raising an exceptionChristos Zisopoulos2009-06-261-30/+88
| | | | | | | | | | | | An exception will be raised if a local javascript/stylesheet file included by the stylesheet_link_tag or javascript_include_tag can not be found. When caching is enabled, we use atomic_write to ensure that the cache file is not created with zero length. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2738 state:committed]
* Add content_for?(:name) helper to check if content_for(:name) is present ↵Darragh Curran2009-06-211-0/+15
| | | | | | [#1311 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Use errors[field] instead of errors.on(field)Jeremy Kemper2009-06-172-9/+9
|
* Cleaning up more tests and code that needed to work in both old and new baseYehuda Katz + Carl Lerche2009-06-171-8/+5
|
* Rename ActionView::Template::Path ActionView::ResolverYehuda Katz + Carl Lerche2009-06-172-4/+4
|
* Fixing pending tests and fixed some formats / partial rendering semanticsYehuda Katz + Carl Lerche2009-06-171-23/+0
|
* Move model naming into ActiveModelJoshua Peek2009-06-175-0/+8
|
* Add :concat option to asset tag helpers to force concatenation.Joshua Peek2009-06-151-0/+30
| | | | | This is useful for working around IE's stylesheet limit. stylesheet_link_tag :all, :concat => true
* allow absolute paths for the asset cachesAndrew Kaspick2009-06-111-0/+16
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Sanitized the id generated by text_area_tag helper method. ↵Stephen Anderson2009-06-091-0/+5
| | | | | | text_area_tag('item[description]') should return: <textarea id="item_description" name="item[description]"></textarea> instead of: <textarea id="item[description]" name="item[description]"></textarea> The old id was causing HTML validation failures. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Made label target radio button tags with values. Radio button now respects ↵David Stevenson2009-06-091-0/+19
| | | | | | inherited :index options when generating id. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* ActionPack components should no longer have undeclared dependencies.Yehuda Katz + Carl Lerche2009-06-083-15/+31
| | | | | | | * 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
* Ensure ERB source begins with the encoding commentJeremy Kemper2009-06-011-4/+21
|
* fix for IE incompatibility of :disable_with in submit_tagHan Kessels2009-06-011-3/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Ruby 1.9: ERB template encoding using a magic comment at the top of the fileJeremy Kemper2009-05-281-1/+1
|
* Ruby 1.9: flushing the output buffer preserves its encodingJeremy Kemper2009-05-281-0/+11
|
* Reinstate pending output buffer testsJeremy Kemper2009-05-281-28/+36
|
* Get all template tests passing on new baseCarl Lerche2009-05-261-1/+4
|
* Added the :rjs render optionYehuda Katz + Carl Lerche2009-05-212-0/+8
|
* Truncate helper accepts a :separator for a more legible result [#1807 ↵Andy Stewart2009-05-181-0/+3
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>