aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/active_model_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-2/+2
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* Explicit html_escape removed when not neededSantiago Pastorino and José Ignacio Costa2010-02-141-2/+2
| | | | Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
* content_tag should escape its inputBruno Michel2010-02-141-3/+3
| | | | Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-6/+5
| | | | | | | | | | | | 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.
* errors in ActionView should not be namespaced as well.José Valim2010-01-071-1/+1
|
* Fix error_messages_for when instance variable names are given.José Valim2009-10-211-6/+6
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Bring agnosticism to error_messages_for.José Valim2009-10-171-6/+10
|
* error procs have to be safe tooMichael Koziarski2009-10-081-1/+1
|
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-0/+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.
* Ruby 1.9.2: implicit argument passing of super from method defined by ↵Jeremy Kemper2009-08-071-3/+1
| | | | define_method() is not supported
* Add support for error_messages_for(@obj)Yehuda Katz2009-07-281-6/+24
|
* Rename ActiveRecordHelper to ActiveModelHelperYehuda Katz2009-07-201-0/+285