aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/prototype_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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]
* prototype and scripty helpers require jsonJoshua Peek2008-11-241-0/+1
|
* Implement submit_to_remote as a wrapper around a more generic button_to_remoteTarmo Tänav2008-10-071-12/+6
| | | | | | | Removed the "return false" from submit_to_remote onclick end as button input elements have no default behavior to cancel. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrailsPratik Naik2008-09-031-1/+1
|
* Allow prototype functions to receive position parameter as a symbol.miloops2008-08-301-1/+1
| | | | | | [#887 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Added button_to_remote helperTarmo Tänav2008-08-291-0/+8
| | | | | | Ticket originally from http://dev.rubyonrails.org/ticket/3641 Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Store application and other context specific helper modules in ↵Joshua Peek2008-08-261-20/+2
| | | | ActionView::Base#helpers
* Cache JavaScriptGenerator's helper module set on the templateJoshua Peek2008-08-261-2/+20
|
* Performance: Cache modules that extend the view context for JavaScriptGeneratorJoshua Peek2008-08-251-3/+1
|
* In javascript helpers option[:type] = :synchronous should work as described ↵miloops2008-07-311-1/+1
| | | | | | in docs. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Prototype helpers should generate Element.insert instead of Insertion.new, ↵miloops2008-07-301-6/+6
| | | | which has been deprecated in Prototype 1.6.
* Merge with docrails.Pratik Naik2008-07-161-1/+1
|
* JavaScriptGenerator should only sets output_buffer for the duration of the ↵Jeremy Kemper2008-07-151-2/+3
| | | | update block
* Get buffer for fragment cache from template's @output_bufferJoshua Peek2008-07-151-187/+188
|
* Changed PrototypeHelper#submit_to_remote to PrototypeHelper#button_to_remote ↵David Heinemeier Hansson2008-07-091-3/+6
| | | | to stay consistent with link_to_remote (submit_to_remote still works as an alias) (clemens) [#8994 status:closed]
* Merge branch 'master' into erboutJeremy Kemper2008-06-051-0/+10
|\
| * Add RJS#page.reload. [#277 state:resolved]Sean Huber2008-06-041-0/+10
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Don't pass block binding to concatJeremy Kemper2008-06-021-2/+2
|/
* Merge docrails.Pratik Naik2008-05-251-4/+4
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>