Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge branch 'master' into normalizecb | Aaron Patterson | 2013-05-13 | 7 | -25/+28 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (61 commits) add tests for reset_calbacks Fixing build broken by this change Extract variable out of loop Updated comment to Rails 4 Fixes NoMethodError: `alias_method_chain` when requiring just active_support/core_ext better error message when app name is not passed in `rails new` Code cleanup for ActionDispatch::Flash#call Fix typo: require -> requires Add CHANGELOG entry for #10576 Merge pull request #10556 from Empact/deprecate-schema-statements-distinct Some editorial changes on the documentation. respond_to -> respond to in a message from AM::Lint specify that dom_(id|class) are deprecated in controllers, views are fine copy edits [ci skip] Fix class and method name typos Replace multi_json with json ruby -> Ruby Adding documentation to the automatic inverse_of finder. Improve CHANGELOG entry [ci kip] Call assume_migrated_upto_version on connection ... Conflicts: activesupport/lib/active_support/callbacks.rb | ||||
| * | Fixes NoMethodError: `alias_method_chain` when requiring just ↵ | Andy Lindeman | 2013-05-12 | 2 | -0/+4 |
| | | | | | | | | | | | | active_support/core_ext * Each file that uses `alias_method_chain` brings it in explicitly | ||||
| * | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2013-05-12 | 4 | -2/+11 |
| |\ | | | | | | | | | | | | | Conflicts: activesupport/lib/active_support/callbacks.rb | ||||
| | * | added docs for InheritedOptions class [ci skip] | Anton Kalyaev | 2013-05-11 | 1 | -0/+8 |
| | | | |||||
| | * | changed rails -> Rails at two places | aditya-kapoor | 2013-05-09 | 2 | -2/+2 |
| | | | |||||
| | * | Changed spelling of Busines to Business | aditya-kapoor | 2013-05-08 | 1 | -1/+1 |
| | | | |||||
| | * | replace apostrophe with backquote for matching [ci skip] | Anton Kalyaev | 2013-05-03 | 1 | -2/+2 |
| | | | |||||
| | * | document String#to_time exception | Vipul A M | 2013-05-02 | 1 | -0/+1 |
| | | | |||||
| * | | Replace multi_json with json | Erik Michaels-Ober | 2013-05-11 | 1 | -21/+4 |
| | | | |||||
| * | | Merge pull request #10534 from cmaruz/master | Rafael Mendonça França | 2013-05-10 | 1 | -1/+4 |
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | Escape of U+2028 and U+2029 in the JSON Encoder Conflicts: activesupport/lib/active_support/json/encoding.rb | ||||
| | * | | Added escaping of U+2028 and U+2029 inside the json encoder. | Mario Caropreso | 2013-05-09 | 1 | -3/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U+2028 and U+2029 are allowed inside strings in JSON (as all literal Unicode characters) but JavaScript defines them as newline seperators. Because no literal newlines are allowed in a string, this causes a ParseError in the browser. We work around this issue by replacing them with the escaped version. The resulting JSON is still valid and can be parsed in the browser. This commit has been coauthored with Viktor Kelemen @yikulju | ||||
| * | | | Fix syntax error on Ruby 2.0 | Rafael Mendonça França | 2013-05-10 | 1 | -2/+4 |
| | | | | | | | | | | | | | | | | | | | | Since Ruby 2.0 is UTF-8 by default we need to explictly say that the encoding of this file is US-ASCII | ||||
| * | | | Merge pull request #10057 from zackham/patch-1 | Rafael Mendonça França | 2013-05-10 | 1 | -2/+4 |
| |\ \ \ | | | | | | | | | | | | | | | | Escape multibyte line terminators in JSON encoding | ||||
| | * | | | Escape multibyte line terminators in JSON encoding | zackham | 2013-04-02 | 1 | -2/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, json/encoding respects the JSON spec (as it should) which disallows \n and \r inside strings, escaping them as expected. Unfortunately, ECMA-262 (Javascript) disallows not only \n and \r in strings, but "Line Terminators" which includes U+2028 and U+2029. See here: http://bclary.com/2004/11/07/#a-7.3 This pull request adds U+2028 and U+2029 to be escaped. # Why? It's very common to see something like this in a Rails template: <script type="text/javascript"> var posts = <%= @posts.to_json %>; </script> If U+2028 or U+2029 are part of any attributes output in the to_json call, you will end up with an exception. In Chrome: Uncaught SyntaxError: Unexpected token ILLEGAL # Why not? This is JSON encoding, and the JSON spec is specific about how to encode strings. U+2028 and U+2029 don't get special treatment. Just trying to start a discussion... what do you do in your apps to deal with this? Is there a convention I'm missing? | ||||
* | | | | | do not keep a reference to the chain in the callback objects | Aaron Patterson | 2013-05-10 | 1 | -12/+10 |
| | | | | | |||||
* | | | | | fix deprecation test | Aaron Patterson | 2013-05-10 | 1 | -0/+2 |
| | | | | | |||||
* | | | | | push merge code to the callback itself | Aaron Patterson | 2013-05-10 | 1 | -18/+10 |
| | | | | | |||||
* | | | | | dup the callback and set the chain | Aaron Patterson | 2013-05-10 | 1 | -8/+8 |
| | | | | | |||||
* | | | | | remove klass because it is not used | Aaron Patterson | 2013-05-10 | 1 | -9/+7 |
| | | | | | |||||
* | | | | | rename instance variables | Aaron Patterson | 2013-05-10 | 1 | -12/+14 |
| | | | | | |||||
* | | | | | push duplicates? logic to the instance | Aaron Patterson | 2013-05-10 | 1 | -16/+7 |
| | | | | | |||||
* | | | | | callback chain is in charge of the cache, so remove method based cache | Aaron Patterson | 2013-05-10 | 1 | -21/+0 |
| | | | | | |||||
* | | | | | __define_callbacks method is not necessary anymore | Aaron Patterson | 2013-05-10 | 1 | -8/+1 |
| | | | | | |||||
* | | | | | just run compiled callbacks since they are cached | Aaron Patterson | 2013-05-10 | 1 | -14/+4 |
| | | | | | |||||
* | | | | | cache compiled callbacks | Aaron Patterson | 2013-05-10 | 1 | -7/+27 |
| | | | | | |||||
* | | | | | use delegation over inheritance so we can figure when to cache / bust cache | Aaron Patterson | 2013-05-10 | 1 | -5/+22 |
| | | | | | |||||
* | | | | | fixing activemodel tests | Aaron Patterson | 2013-05-10 | 1 | -1/+2 |
| | | | | | |||||
* | | | | | use an environment object to hold state about the filter calls | Aaron Patterson | 2013-05-10 | 1 | -21/+41 |
| | | | | | |||||
* | | | | | object based callbacks cannot be duplicated | Aaron Patterson | 2013-05-10 | 1 | -7/+4 |
| | | | | | |||||
* | | | | | pass the run block as a normal variable to the rest of the callbacks | Aaron Patterson | 2013-05-10 | 1 | -12/+12 |
| | | | | | |||||
* | | | | | fixing more variable names | Aaron Patterson | 2013-05-10 | 1 | -10/+10 |
| | | | | | |||||
* | | | | | fix variable name | Aaron Patterson | 2013-05-10 | 1 | -6/+6 |
| | | | | | |||||
* | | | | | reduce the number of lambas | Aaron Patterson | 2013-05-10 | 1 | -5/+2 |
| | | | | | |||||
* | | | | | callback sequence is no longer used | Aaron Patterson | 2013-05-10 | 1 | -6/+0 |
| | | | | | |||||
* | | | | | no need for variable assignments, just pass the values in | Aaron Patterson | 2013-05-10 | 1 | -6/+2 |
| | | | | | |||||
* | | | | | make_lambda is never called with an Array | Aaron Patterson | 2013-05-10 | 1 | -2/+0 |
| | | | | | |||||
* | | | | | callbacks are wrapped with lambdas | Aaron Patterson | 2013-05-10 | 1 | -106/+76 |
| | | | | | |||||
* | | | | | remove dead code | Aaron Patterson | 2013-05-10 | 1 | -10/+0 |
| | | | | | |||||
* | | | | | fix method names | Aaron Patterson | 2013-05-10 | 1 | -40/+44 |
| | | | | | |||||
* | | | | | using lambas for the callback bodies | Aaron Patterson | 2013-05-10 | 1 | -32/+12 |
| | | | | | |||||
* | | | | | wrap all options in lambas | Aaron Patterson | 2013-05-10 | 1 | -7/+13 |
| | | | | | |||||
* | | | | | conditions in callbacks return consistent lambdas | Aaron Patterson | 2013-05-10 | 1 | -9/+43 |
|/ / / / | |||||
* | | | | Merge pull request #10531 from waseem/refactor_require | Carlos Antonio da Silva | 2013-05-09 | 1 | -4/+4 |
|\ \ \ \ | | | | | | | | | | | Require different core extensions correctly. | ||||
| * | | | | Require different core extensions correctly. | Waseem Ahmad | 2013-05-09 | 1 | -4/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The begin rescue block is specifically to catch LoadError while loading i18n gem. Other core extensions, under active support, should be required outside of the begin rescue block. | ||||
* | | | | | rails -> Rails [ci skip] | Prathamesh Sonpatki | 2013-05-09 | 2 | -2/+2 |
|/ / / / | |||||
* | | | | use public send on the scope parameters | Aaron Patterson | 2013-05-08 | 1 | -1/+1 |
| | | | | |||||
* | | | | using strings as scopes is not used anywhere, so remove it | Aaron Patterson | 2013-05-08 | 1 | -1/+1 |
| | | | | |||||
* | | | | adding tests for lambdas as conditions | Aaron Patterson | 2013-05-08 | 1 | -1/+1 |
| |/ / |/| | | |||||
* | | | separate identification computation | Aaron Patterson | 2013-05-08 | 1 | -24/+18 |
| | | | |||||
* | | | separate filters from source code | Aaron Patterson | 2013-05-08 | 1 | -20/+31 |
| | | |