aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/prototype_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Ensure observe_field encodes value parameter. [#216 state:resolved]Frederick Cheung2008-05-191-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix remote_function to escape apostrophes inside the remote url passed to ↵Andre Arko2008-05-131-1/+1
| | | | | | Ajax.Update. [#180 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrails:Pratik Naik2008-05-091-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e6afd8b2736364322b673bbdcca3e9b38b6d3da0 Author: Xavier Noria <fxn@hashref.com> Date: Thu May 8 23:49:36 2008 +0200 Overall documentation improvement and markup corrections. Zillion changes. commit 2fead68b3192332eee27945ed95a94a64ca73f70 Author: Austin Putman <austin@emmanuel.local> Date: Wed May 7 19:35:46 2008 -0700 Documented class methods on ActionController::Routing. These are dangerous, and mostly used for testing. commit f5b84182dbc39bea79c8ee319c688d00fa99f9d1 Author: Teflon Ted <github@rudiment.net> Date: Wed May 7 16:08:49 2008 -0400 Added explanation about errant inflections not being patched in the future in order to avoid breaking legacy applications. commit 370f4f51722cec49ace17093d29e9ce9e8f15cfb Author: Sunny Ripert <negatif@gmail.com> Date: Wed May 7 14:00:59 2008 +0200 Applied list conventions in AR::Base commit 5bd18429f09d44e75191bec42a6db04bd33f3030 Author: Sunny Ripert <negatif@gmail.com> Date: Wed May 7 13:53:35 2008 +0200 Renamed Options list to Attributes list whenever they weren't option hashes in AR::Base commit d912bd5672316454457ae83f6e9dda5197beeb6f Author: Yaroslav Markin <yaroslav@markin.net> Date: Wed May 7 13:50:28 2008 +0400 Add a filter_parameter_logging usage hint to generated ApplicationController. This may help to remind the developer to filter sensitive information from application logs. Closes #11578 commit b243de0db3c2605121e055079854af5090d06374 Author: Jack Danger Canty <git@6brand.com> Date: Tue May 6 23:39:47 2008 -0700 doc: disambiguating an example ActiveRecord class commit f81d771f0657ae8375b84a77a059812cce5d6fd9 Author: Jack Danger Canty <git@6brand.com> Date: Tue May 6 23:35:05 2008 -0700 doc: ActiveRecord::Reflection::AssociationReflection#through_reflection Added documentation demonstrating the use of #through_reflection for finding intervening reflection objects for HasManyThrough and HasOneThrough. commit ae6b46f00b5b8b2939c6b37ce3329c83de7e71db Author: Cheah Chu Yeow <chuyeow@gmail.com> Date: Wed May 7 13:47:41 2008 +0800 Document AttributeAssignmentError and MultiparameterAssignmentErrors. commit 8f463550b597db2156b67733f31aed13487fbc3a Author: John Barnette <jbarnette@gmail.com> Date: Tue May 6 22:46:44 2008 -0700 Killing/fixing a bunch of outdated language in the AR README. commit aca44bcd92ef783abdf484b58abdde6786db0f89 Author: Cheah Chu Yeow <chuyeow@gmail.com> Date: Wed May 7 13:34:52 2008 +0800 Make a note about ActiveResource::Timeouterror being raised when ARes calls timeout. commit 284a930a93fbee16e25d06392779dbf2f03e9e12 Author: Jonathan Dance <jd@wuputah.com> Date: Tue May 6 14:58:26 2008 -0400 improvements to the page caching docs commit 9482da621390c874da7c921c8bd6230caae7035a Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 18:13:40 2008 +0200 validates_numericality_of() "integer" option really is "only_integer" commit e9afd6790a8f530528f6597a7f59bb283be754f6 Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 12:11:59 2008 +0200 Harmonized hash notation in AR::Base commit 67ebf14a91ffd970b582be4ff2991d691a9cf3e1 Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 12:06:19 2008 +0200 Turned options into rdoc-lists in AR::Base commit 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297 Author: Marshall Huss <mwhuss@Macbook.local> Date: Sun May 4 23:21:33 2008 -0400 Added information of how to set element_name in the case the user has a name confliction with an existing model Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation coverage and markupXavier Noria2008-05-021-10/+10
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation.Pratik Naik2008-04-051-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546Pratik Naik2008-04-021-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: toplevel AS reference within BasicObjectJeremy Kemper2008-04-011-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't append the forgery token to an ajax request if it's serializing a ↵Michael Koziarski2008-01-081-2/+2
| | | | | | form, prevents duplicate tokens. Closes #10684 [macournoyer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8598 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use explicit toplevel namespace for constant reference in AS::BasicObjectJeremy Kemper2008-01-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce ActiveSupport::BasicObject which bridges Builder::BlankSlate and ↵Jeremy Kemper2007-12-281-5/+1
| | | | | | Ruby 1.9 BasicObject. Closes #10634 [Frederick Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8500 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: javascript proxy. References #1689 [Frederick Cheung]Jeremy Kemper2007-12-271-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed documentation that made rdoc barkDavid Heinemeier Hansson2007-12-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8323 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed documentation that made rdoc barkDavid Heinemeier Hansson2007-12-061-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add documentation examples to prototype helper. Closes #7211 [manfred]Marcel Molina2007-12-051-2/+23
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8308 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add many examples to PrototypeHelper documentation. Closes #7656 ↵Marcel Molina2007-12-051-25/+256
| | | | | | [jeremymcanally] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8302 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document :with option for link_to_remote. Closes #8765 [ryanb]Marcel Molina2007-11-061-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8103 5ecf4fe2-1ee6-0310-87b1-e25e094e27de