aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/prototype_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* * Add pluggable JSON backends with support for the JSON gem. [rick]rick2009-04-231-7/+9
| | | | | | | | | | | | | | Example: ActiveSupport::JSON.backend = "JSONGem" All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode(). Use of #to_json is not recommended, as it may clash with other libraries that overwrite it. However, you can recover Rails specific functionality if you really want to use #to_json. gem 'json' ActiveSupport::JSON.backend = "JSONGem" class ActiveRecord::Base alias to_json rails_to_json end
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Prototype helpers support the onCreate callback.Jeremy Kemper2009-03-081-1/+1
| | | | | | | | [#1074 state:committed]
* | Begin unifying the interface between ActionController and ActionViewYehuda Katz2009-01-221-3/+3
|/
* Remove observe_field :on option as prototype no longer supports it [#1088 ↵Frederick Cheung2008-12-211-11/+0
| | | | state:resolved]