aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/prototype_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Call html_escape in ERB::Util module and don't mix it in in the helpersSantiago Pastorino2010-10-181-1/+2
|
* Clean up the house before moving in the new furniture.José Valim2010-10-101-1/+1
| | | | This commit moves all the template rendering logic that was hanging around AV::Base to renderer objects.
* Tiny fixes to rdocAlexey Mahotkin2010-09-161-4/+4
|
* Wrap all occurences of <script> in a <tt> tag in docs [#5537 state:committed]David Trasbo2010-09-061-8/+8
|
* Removing RJS hackThiago Pradi2010-09-021-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* update remote_function docs referencing link_to_remoteAndrew Kaspick2010-07-221-1/+1
|
* remote_function patch with more detailed testAndrew Kaspick2010-07-211-1/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* url_for no longer escapes HTML, the :escape option is also goneXavier Noria2010-06-301-1/+1
| | | | Rationale: url_for is just a path/URL generator, it is the responsability of the caller to escape conveniently HTML needs it, JavaScript needs different escaping, a text mail needs no escaping at all, etc.
* returning -> tapJeremy Kemper2010-06-281-5/+4
|
* removed 'unless const_defined?' code smellJosh Kalderimis2010-06-211-8/+6
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Adds title and description where needed.Rizwan Reza2010-06-161-0/+1
|
* Fix prototype grep depending on JSON encoding regexp as JavaScript regexpJeremy Kemper2010-04-271-1/+1
|
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+1
|
* Merge branch 'master' into docrailswycats2010-03-261-41/+8
|\
| * Improve performance of the rendering stack by freezing formats as a sign ↵José Valim2010-03-191-5/+3
| | | | | | | | that they shouldn't be further modified.
| * Modify assert_template to use notifications. Also, remove ↵Carlhuda2010-03-171-1/+1
| | | | | | | | ActionController::Base#template since it is no longer needed.
| * Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM ↵wycats2010-03-171-2/+0
| | | | | | | | warnings are in dependencies.
| * link_to_function is here to stayJoshua Peek2010-03-161-33/+0
| |
| * Add deprecation notices for <% %>.Carlhuda2010-03-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Merge remote branch 'mainstream/master'Pratik Naik2010-03-151-1/+0
|\|
| * Finish cleaning up rendering stack from views and move assigns evaluation to ↵José Valim2010-03-121-1/+0
| | | | | | | | controller (so plugins and/or controllers can overwrite just one method).
* | Merge remote branch 'mainstream/master'Pratik Naik2010-03-121-11/+17
|\| | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/base.rb railties/lib/rails/configuration.rb railties/lib/rails/log_subscriber.rb
| * Added template lookup responsible to hold all information used in template ↵José Valim2010-03-071-2/+2
| | | | | | | | lookup.
| * Change AV formats so they can delegate to the controller. Now users (or ↵Carlhuda2010-03-011-15/+17
| | | | | | | | plugins) can override details_for_render in their controllers and add appropriate additional details. Now if only they could *do* something with those details...
| * Delegate formats to the controllerCarlhuda2010-03-011-0/+4
| |
* | Updated documentation for block helpers in prototype_helper.rbJeroen van Dijk2010-03-121-1/+1
|/
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-1/+1
| | | | | | | | | | | | Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self). * Additionally, instead of doing concat("</form>".html_safe), you can do safe_concat("</form>"), which will skip both the flag set, and the flag check. * For the first pass, I converted virtually all #html_safe!s to #html_safe, and the tests pass. A further optimization would be to try to use #safe_concat as much as possible, reducing the performance impact if we know up front that a String is safe.
* Reorg options_for_javascript and array_or_string_for_javascriptJoshua Peek2010-01-301-0/+8
|
* Move button_to_function to prototype helperJoshua Peek2010-01-301-0/+33
|
* Move scripty JSG helpers into scriptaculous_helper.rbJoshua Peek2010-01-301-26/+0
|
* Move form_remote_tag and remote_form_for into prototype_legacy_helperJoshua Peek2010-01-301-109/+0
|
* Move button_to_remote and submit_to_remote into prototype_legacy_helperJoshua Peek2010-01-301-38/+0
| | | | plugin
* Move link_to_function and link_to_remote into prototype_legacy_helperJoshua Peek2010-01-301-141/+0
| | | | plugin
* Move periodically_call_remote into prototype_legacy_helper pluginJoshua Peek2010-01-301-35/+0
|
* Move observe_field and observe_form to prototype_legacy_helper pluginJoshua Peek2010-01-301-154/+35
|
* Revert "Merge branch 'rails/master' into ujs"Joshua Peek2010-01-301-3/+446
| | | | | | | | | | | This reverts commit 3aa1ea1ae4baa4a03d03644e798eeb98a4745785, reversing changes made to 2c12a71378d2146c822acb389b00b866f6420ff5. Conflicts: actionpack/lib/action_view/helpers/javascript_helper.rb actionpack/lib/action_view/helpers/url_helper.rb actionpack/test/template/url_helper_test.rb
* moving include of ScriptaculousHelper into PrototypeHelper, ActionView ↵Erik St. Martin2010-01-271-0/+3
| | | | should know as little as possible about individual frameworks
* Removed all helpers from PrototypeHelper that are implemented in AjaxHelper. ↵Erik St. Martin2010-01-271-446/+0
| | | | Modified tests that extended with PrototypeHelper to now extend using AjaxHelper. AjaxHelper is now included by default in view helper
* removes now void extending.rbXavier Noria2010-01-261-1/+0
|
* Fixed that PrototypeHelper#update_page should return html_safe [DHH]David Heinemeier Hansson2010-01-081-1/+1
|
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-1/+1
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Got tests to pass with some more changes.Yehuda Katz2009-08-151-2/+3
| | | | | | | | | | | | | | | | * 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".
* Explicitly qualify constants in BasicObjectsJeremy Kemper2009-06-081-1/+1
|
* Use as_json instead of rails_to_jsonJeremy Kemper2009-06-081-2/+2
|
* Add explicit requirement in a few cases it was missing.Yehuda Katz2009-06-021-0/+1
| | | TODO: Come up with the minimal core and remove all of these
* Added the :rjs render optionYehuda Katz + Carl Lerche2009-05-211-0/+2
|
* Now that we have a separate internal rails_to_json, use a separate circular ↵Jeremy Kemper2009-04-261-2/+2
| | | | reference stack instead of sticking it in the options hash
* Use javascript_object_forJeremy Kemper2009-04-261-1/+1
|
* Only Object to_json alias is needed. Prefer nil options.Jeremy Kemper2009-04-261-2/+0
|
* Qualify toplevel constant references since we're in a BasicObjectJeremy Kemper2009-04-261-7/+7
|