aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | 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
|\
| * Document Hash#extract!.Sebastian Martinez2011-08-151-0/+2
| |
| * Remove unnecessary require (happened after fcbde454f6)Dmitriy Kiriyenko2011-08-131-2/+0
| |
| * remove_possible_method: test if method existsBrad Ediger2011-08-131-2/+7
| | | | | | | | | | | | | | This speeds up remove_possible_method substantially since it doesn't have to rescue a NameError in the common case. Closes #2346.
| * Reset @dirty to false when slicing an instance of SafeBufferBrian Cardarella2011-08-131-0/+6
| |
* | prefer ends_with? over slicingXavier Noria2011-08-161-1/+2
| |
* | Added Array#prepend as an alias for Array#unshift and Array#append as an ↵David Heinemeier Hansson2011-08-152-0/+8
| | | | | | | | alias for Array#<< [DHH]
* | Document Object#public_sendJon Leighton2011-08-151-1/+1
| |
* | Add a test for delegating a method ending in '=' as this is a special case.Jon Leighton2011-08-151-0/+1
| |
* | Need to include public_sendArun Agrawal2011-08-151-0/+1
| |
* | Split up the definitions in Module#delegate depending on :allow_nil, and ↵Jon Leighton2011-08-151-17/+22
| | | | | | | | don't use exceptions for flow control in the :allow_nil => true case.
* | Fix the line number in the backtrace when Module#delegate raisesJon Leighton2011-08-151-1/+1
| |
* | Just do the method call directly in Module#delegate, if we can (we cannot ↵Jon Leighton2011-08-151-1/+4
| | | | | | | | for method names ending in '='). Two reasons: 1) it's faster, see https://gist.github.com/1089783 and 2) more importantly, delegate should not allow you to accidentally call private or protected methods.
* | Backport Object#public_send to 1.8 so that we can implement Module#delegate ↵Jon Leighton2011-08-152-0/+26
| | | | | | | | such that non-public methods raise
* | backporting IO#binread for 1.8 usersAaron Patterson2011-08-081-0/+15
| |
* | Refactored to more closely resemble idiom applied for on_nilEvan Light2011-08-051-5/+11
| |
* | Fix AR test suite error under Rubinius 2.0Guillermo Iguaran2011-08-051-0/+1
| |
* | Remove unnecessary require (happened after fcbde454f6)Dmitriy Kiriyenko2011-08-011-2/+0
| |
* | remove_possible_method: test if method existsBrad Ediger2011-07-311-2/+7
| | | | | | | | | | | | | | This speeds up remove_possible_method substantially since it doesn't have to rescue a NameError in the common case. Closes #2346.
* | Reset @dirty to false when slicing an instance of SafeBufferBrian Cardarella2011-07-291-0/+6
|/
* Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-07-241-1/+1
|\