aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
Commit message (Collapse)AuthorAgeFilesLines
* Restore performance of ERB::Util.html_escapeJon Jensen2011-12-031-1/+1
| | | | | | | Revert html_escape to do a single gsub again, but add the "n" flag (no language, i.e. not multi-byte) to protect against XSS via invalid utf8 Signed-off-by: José Valim <jose.valim@gmail.com>
* Added Enumerable#pluck to wrap the common pattern of collect(&:method) *DHH*David Heinemeier Hansson2011-12-021-0/+7
|
* Module#synchronize is deprecated with no replacement. Please use `monitor` ↵Aaron Patterson2011-11-291-0/+2
| | | | from ruby's standard library.
* Merge pull request #3767 from tadast/object_inYehuda Katz2011-11-261-7/+17
|\ | | | | Object#in? also accepts multiple parameters
| * Object#in? also accepts multiple parametersTadas Tamošauskas2011-11-261-7/+17
| |
* | Adds Time#sunday methodVijay Dev2011-11-261-0/+6
| |
* | Convert aliases monday and sunday to methodsVijay Dev2011-11-262-3/+18
| | | | | | | | | | | | | | | | A recent change to beginning_of_week and end_of_week added an argument that can be used to specify the week's starting day as a symbol. Now these methods were aliased as monday and sunday respectively which as a consequence of the argument addition, made calls like obj.monday(:sunday) possible. This commit makes them methods on their own.
* | minor doc changesVijay Dev2011-11-261-3/+3
| |
* | some tweaks to PR#3547. [Closes #3547]Xavier Noria2011-11-251-7/+12
| |
* | API docstrings updated with default value infogregolsen2011-11-252-6/+6
| |
* | beginning_of_week extended in both Time and Date so that to return week ↵gregolsen2011-11-252-16/+32
| | | | | | | | start based on start day that is monday by default
* | Merge branch 'master' into serializersJosé Valim2011-11-236-11/+112
|\ \
| * \ Merge pull request #3725 from marcandre/twz_eqlYehuda Katz2011-11-221-0/+10
| |\ \ | | |/ | |/| Fix inconsistencies with Time{WithZone}#{hash,eql?}
| | * Fix inconsistencies with Time{WithZone}#{hash,eql?}Marc-Andre Lafortune2011-11-221-0/+10
| | |
| * | updating API docstring so that user can infer default valuegregolsen2011-11-172-4/+4
| |/
| * fixes a typo (thanks to Alexey Vakhov)Xavier Noria2011-10-301-1/+1
| |
| * defines Module#qualified_const_(defined?|get|set) and String#deconstantizeXavier Noria2011-10-293-1/+81
| | | | | | | | | | | | | | | | | | | | This commit also implements a faster version of #demodulize I was unable to isolate with git add --patch. Not a big fan of the name #deconstantize. It complements #demodulize getting rid of the rightmost constant, hence the name, but it is unrelated to the well-known #constantize. So unsure. Could not come with anything better, please feel free to rename.
| * Merge branch 'master' of github.com:lifo/docrailsVijay Dev2011-10-201-3/+3
| |\
| | * Fixed misleading docs for String#to_formatted_s(:db)Martin Svalin2011-10-201-3/+3
| | |
| * | Merge pull request #3151 from zenprogrammer/pluralize_without_countJosé Valim2011-10-171-3/+14
| |\ \ | | |/ | |/| Added include_count parameter to pluralize.
| | * Modified String#pluralize to take an optional count parameter.Ryan Oblak2011-09-281-3/+14
| | |
* | | Don't unnecessarily use String eval.Jose and Yehuda2011-10-151-2/+2
|/ /
* | Revert "don't raise NoMethodError the tried method doesn't exists"José Valim2011-10-061-2/+0
| | | | | | | | This reverts commit 29a5aeaae976bf8432d57ec996c7c81932a39de6.
* | ruby193: String#prepend is also unsafeAkira Matsuda2011-10-051-1/+1
| |
* | override unsafe methods only if defined on StringAkira Matsuda2011-10-051-10/+12
| |
* | to_formatted_s is an instance method for a Range not an ArrayAyrton De Craene2011-10-041-1/+1
| |
* | Merge pull request #2801 from jeremyevans/patch-1Jeremy Kemper2011-10-031-1/+1
|\ \ | | | | | | Fix obviously breakage of Time.=== for Time subclasses
| * | Edited activesupport/lib/active_support/core_ext/time/calculations.rb via GitHubJeremy Evans2011-09-011-1/+1
| | |
* | | Set the default options value for as_json in the encoder object.José Valim2011-09-301-1/+1
| | |
* | | Fixing `as_json` method for ActiveRecord models.Nicolás Hock Isaza2011-09-291-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | When you've got an AR Model and you override the `as_json` method, you should be able to add default options to the renderer, like this: class User < ActiveRecord::Base def as_json(options = {}) super(options.merge(:except => [:password_digest])) end end This was not possible before this commit. See the added test case.
* | remove superfluous to_s in ERB::Util.html_escapeAlexey Vakhov2011-09-241-1/+1
| |
* | Minor doc fix to String#constantizeRyan Oblak2011-09-231-3/+3
| |
* | Use safe_constantize where possible.José Valim2011-09-231-3/+1
| |
* | Added ActiveSupport::Inflector.safe_constantize and String#safe_constantize; ↵Ryan Oblak2011-09-231-3/+16
| | | | | | | | refactored common constantize tests into ConstantizeTestCases
* | fix incorrect commentVijay Dev2011-09-221-1/+1
| |
* | Merge pull request #3049 from brainopia/fix_to_query_edge_caseSantiago Pastorino2011-09-171-1/+1
|\ \ | | | | | | Fix Hash#to_query edge case with html_safe string on 1.8 ruby
| * | Fix Hash#to_query edge case with html_safe string on 1.8 rubybrainopia2011-09-161-1/+1
| | |
* | | Proper lines numbers for stack trace infoSantiago Pastorino2011-09-161-1/+1
|/ /
* | revert the changes from c60995f3 - related to marking sub,gsub as ↵Vijay Dev2011-09-091-20/+1
| | | | | | | | unavailable to use with safe strings
* | Revert removing gsub and sub from safe buffer.José Valim2011-09-081-3/+3
| |
* | this should have gone with the previous commitXavier Noria2011-09-081-4/+4
| |
* | copy-edits a couple of exception messagesXavier Noria2011-09-081-4/+4
| | | | | | | | | | | | | | "Safe Buffer" should either be the constant with the class name, or go in lower case. I've chosen to follow the same terminology that is used in the AS core extensiong guide, "safe string", though "safe buffer" is also used elsewhere, we should pick one.
* | better method documentation on disable safe string methodsDamien Mathieu2011-09-081-6/+12
| |
* | make gsub and sub unavailable in SafeBuffers - Closes #1555Damien Mathieu2011-09-081-3/+16
| |
* | docs formatting changesVijay Dev2011-09-012-3/+3
|/
* Revert "Ruby 1.8.7+ provides to_date/to_datetime, AS just makes them ↵Chris Griego2011-08-311-0/+22
| | | | | | | | public." to support date implementations without private to_date/to_datetime on Time (home_run). This reverts commit 080345baca1076a9788dff4803153600aec31f86. Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert all the stuff to do with disallowing non-public methods for ↵Jon Leighton2011-08-253-32/+2
| | | | Module#delegate
* only backport the to_d method if it does not existAaron Patterson2011-08-241-2/+5
|
* properly escape html to avoid invalid utf8 causing XSS attacksAaron Patterson2011-08-161-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsXavier Noria2011-08-161-0/+2
|\