Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Revert "don't raise NoMethodError the tried method doesn't exists" | José Valim | 2011-10-06 | 1 | -2/+0 | |
| | | | | | | | | This reverts commit 29a5aeaae976bf8432d57ec996c7c81932a39de6. | |||||
* | | ruby193: String#prepend is also unsafe | Akira Matsuda | 2011-10-05 | 1 | -1/+1 | |
| | | ||||||
* | | override unsafe methods only if defined on String | Akira Matsuda | 2011-10-05 | 1 | -10/+12 | |
| | | ||||||
* | | to_formatted_s is an instance method for a Range not an Array | Ayrton De Craene | 2011-10-04 | 1 | -1/+1 | |
| | | ||||||
* | | Merge pull request #2801 from jeremyevans/patch-1 | Jeremy Kemper | 2011-10-03 | 1 | -1/+1 | |
|\ \ | | | | | | | Fix obviously breakage of Time.=== for Time subclasses | |||||
| * | | Edited activesupport/lib/active_support/core_ext/time/calculations.rb via GitHub | Jeremy Evans | 2011-09-01 | 1 | -1/+1 | |
| | | | ||||||
* | | | Set the default options value for as_json in the encoder object. | José Valim | 2011-09-30 | 1 | -1/+1 | |
| | | | ||||||
* | | | Fixing `as_json` method for ActiveRecord models. | Nicolás Hock Isaza | 2011-09-29 | 1 | -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_escape | Alexey Vakhov | 2011-09-24 | 1 | -1/+1 | |
| | | ||||||
* | | Minor doc fix to String#constantize | Ryan Oblak | 2011-09-23 | 1 | -3/+3 | |
| | | ||||||
* | | Use safe_constantize where possible. | José Valim | 2011-09-23 | 1 | -3/+1 | |
| | | ||||||
* | | Added ActiveSupport::Inflector.safe_constantize and String#safe_constantize; ↵ | Ryan Oblak | 2011-09-23 | 1 | -3/+16 | |
| | | | | | | | | refactored common constantize tests into ConstantizeTestCases | |||||
* | | fix incorrect comment | Vijay Dev | 2011-09-22 | 1 | -1/+1 | |
| | | ||||||
* | | Merge pull request #3049 from brainopia/fix_to_query_edge_case | Santiago Pastorino | 2011-09-17 | 1 | -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 ruby | brainopia | 2011-09-16 | 1 | -1/+1 | |
| | | | ||||||
* | | | Proper lines numbers for stack trace info | Santiago Pastorino | 2011-09-16 | 1 | -1/+1 | |
|/ / | ||||||
* | | revert the changes from c60995f3 - related to marking sub,gsub as ↵ | Vijay Dev | 2011-09-09 | 1 | -20/+1 | |
| | | | | | | | | unavailable to use with safe strings | |||||
* | | Revert removing gsub and sub from safe buffer. | José Valim | 2011-09-08 | 1 | -3/+3 | |
| | | ||||||
* | | this should have gone with the previous commit | Xavier Noria | 2011-09-08 | 1 | -4/+4 | |
| | | ||||||
* | | copy-edits a couple of exception messages | Xavier Noria | 2011-09-08 | 1 | -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 methods | Damien Mathieu | 2011-09-08 | 1 | -6/+12 | |
| | | ||||||
* | | make gsub and sub unavailable in SafeBuffers - Closes #1555 | Damien Mathieu | 2011-09-08 | 1 | -3/+16 | |
| | | ||||||
* | | docs formatting changes | Vijay Dev | 2011-09-01 | 2 | -3/+3 | |
|/ | ||||||
* | Revert "Ruby 1.8.7+ provides to_date/to_datetime, AS just makes them ↵ | Chris Griego | 2011-08-31 | 1 | -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 Leighton | 2011-08-25 | 3 | -32/+2 | |
| | | | | Module#delegate | |||||
* | only backport the to_d method if it does not exist | Aaron Patterson | 2011-08-24 | 1 | -2/+5 | |
| | ||||||
* | properly escape html to avoid invalid utf8 causing XSS attacks | Aaron Patterson | 2011-08-16 | 1 | -1/+1 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Xavier Noria | 2011-08-16 | 1 | -0/+2 | |
|\ | ||||||
| * | Document Hash#extract!. | Sebastian Martinez | 2011-08-15 | 1 | -0/+2 | |
| | | ||||||
| * | Remove unnecessary require (happened after fcbde454f6) | Dmitriy Kiriyenko | 2011-08-13 | 1 | -2/+0 | |
| | | ||||||
| * | remove_possible_method: test if method exists | Brad Ediger | 2011-08-13 | 1 | -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 SafeBuffer | Brian Cardarella | 2011-08-13 | 1 | -0/+6 | |
| | | ||||||
* | | prefer ends_with? over slicing | Xavier Noria | 2011-08-16 | 1 | -1/+2 | |
| | | ||||||
* | | Added Array#prepend as an alias for Array#unshift and Array#append as an ↵ | David Heinemeier Hansson | 2011-08-15 | 2 | -0/+8 | |
| | | | | | | | | alias for Array#<< [DHH] | |||||
* | | Document Object#public_send | Jon Leighton | 2011-08-15 | 1 | -1/+1 | |
| | | ||||||
* | | Add a test for delegating a method ending in '=' as this is a special case. | Jon Leighton | 2011-08-15 | 1 | -0/+1 | |
| | | ||||||
* | | Need to include public_send | Arun Agrawal | 2011-08-15 | 1 | -0/+1 | |
| | | ||||||
* | | Split up the definitions in Module#delegate depending on :allow_nil, and ↵ | Jon Leighton | 2011-08-15 | 1 | -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 raises | Jon Leighton | 2011-08-15 | 1 | -1/+1 | |
| | | ||||||
* | | Just do the method call directly in Module#delegate, if we can (we cannot ↵ | Jon Leighton | 2011-08-15 | 1 | -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 Leighton | 2011-08-15 | 2 | -0/+26 | |
| | | | | | | | | such that non-public methods raise | |||||
* | | backporting IO#binread for 1.8 users | Aaron Patterson | 2011-08-08 | 1 | -0/+15 | |
| | | ||||||
* | | Refactored to more closely resemble idiom applied for on_nil | Evan Light | 2011-08-05 | 1 | -5/+11 | |
| | | ||||||
* | | Fix AR test suite error under Rubinius 2.0 | Guillermo Iguaran | 2011-08-05 | 1 | -0/+1 | |
| | | ||||||
* | | Remove unnecessary require (happened after fcbde454f6) | Dmitriy Kiriyenko | 2011-08-01 | 1 | -2/+0 | |
| | | ||||||
* | | remove_possible_method: test if method exists | Brad Ediger | 2011-07-31 | 1 | -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 SafeBuffer | Brian Cardarella | 2011-07-29 | 1 | -0/+6 | |
|/ | ||||||
* | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-07-24 | 1 | -1/+1 | |
|\ | ||||||
| * | Changed a few instances of of words in the API docs written in British ↵ | Oemuer Oezkir | 2011-07-24 | 1 | -1/+1 | |
| | | | | | | | | | | | | English to American English(according to Weber) | |||||
* | | simplify singleton_class? method | Aaron Patterson | 2011-07-23 | 1 | -7/+1 | |
| | |