aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #15902 from yuki24/fix-name-error-bugRafael Mendonça França2014-06-242-5/+5
|\ | | | | Fix a bug where NameError#name returns a qualified name in string
| * Fix a bug where NameError#name returns a qualified name in stringYuki Nishijima2014-06-242-5/+5
| | | | | | | | | | | | | | Ruby's original behaviour is that : * It only returns a const name, not a qualified aname * It returns a symbol, not a string
* | Merge pull request #15836 from DNNX/router-swap-select-sortRafael Mendonça França2014-06-241-1/+2
|\ \ | | | | | | Replace x.sort_by!.select! with x.select!.sort_by!
| * | Replace x.sort_by!.select! with x.select!.sort_by!Viktar Basharymau2014-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The latter has the same speed as the former in the worst case and faster in general, because it is always better to sort less items. Unfortunately, `routes.select!{...}.sort_by!{...}` is not possible here because `select!` returns `nil`, so select! and sort! must be done in two steps.
* | | Merge pull request #15885 from lucasmazza/lm-skip-routesRafael Mendonça França2014-06-242-2/+13
|\ \ \ | |_|/ |/| | Add a '--skip-routes' flag for the Controller generator.
| * | Add a '--skip-routes' flag for the Controller generator.Lucas Mazza2014-06-242-2/+13
| | | | | | | | | | | | | | | This way it is possible to skip the addition of the 'get "foo/bar"' routes when generating a controller.
* | | Merge pull request #15899 from garethrees/gr-texthelperRafael Mendonça França2014-06-242-6/+6
|\ \ \ | | | | | | | | Deal with regex match groups in excerpt
| * | | Deal with regex match groups in excerptGareth Rees2014-06-242-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original implementation has bugs if the regex contains a match group. Example: excerpt('This is a beautiful? morning', /\b(beau\w*)\b/i, :radius => 5) Expected: "...is a beautiful? mor..." Actual: "...is a beautifulbeaut..." The original phrase was being converted to a regex and returning the text either side of the phrase as expected: 'This is a beautiful? morning'.split(/beautiful/i, 2) # => ["This is a ", "? morning"] When we have a match with groups the match is returned in the array. Quoting the ruby docs: "If pattern is a Regexp, str is divided where the pattern matches. [...] If pattern contains groups, the respective matches will be returned in the array as well." 'This is a beautiful? morning'.split(/\b(beau\w*)\b/iu, 2) # => ["This is a ", "beautiful", "? morning"] If we assume we want to split on the first match – this fix makes that assumption – we can pass the already assigned `phrase` variable as the place to split (because we already know that a match exists from line 168). Originally spotted by Louise Crow (@crowbot) at https://github.com/mysociety/alaveteli/pull/1557
* | | | Merge pull request #15887 from RudyOnRails/patch-1Arthur Nogueira Neves2014-06-241-3/+3
|\ \ \ \ | |/ / / |/| | | Improves readability of this line...
| * | | Improves readability...Kevin Musiorski2014-06-241-3/+3
| | | | | | | | | | | | | | | | [ci skip]
* | | | Merge pull request #15828 from yuki24/add-warning-about-rescue-from-exceptionSean Griffin2014-06-241-0/+2
|\ \ \ \ | | | | | | | | | | Add warning section for `rescue_from Exception` in Guides
| * | | | Add warning for `rescue_from Exception` and `rescue_from StandardError`Yuki Nishijima2014-06-191-0/+2
| | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | Doc pass for `Type::Value` [ci skip]Sean Griffin2014-06-242-23/+43
| | | | |
* | | | | Merge pull request #15895 from sgrif/sg-numeric-changesYves Senn2014-06-243-3/+35
|\ \ \ \ \ | | | | | | | | | | | | Always assume strings with non-numeric characters change numeric types
| * | | | | Always assume strings with non-numeric characters change numeric typesSean Griffin2014-06-243-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously only did this if the old value was zero, to make sure numericality validations run and failed if the user gave 'wibble' as the value, which would be type cast to 0. However, numericality validations will fail if there are any non-numeric characters in the string, so 5 -> '5wibble' should also be marked as changed.
* | | | | | Merge pull request #15894 from sgrif/sg-silence-warning-in-testYves Senn2014-06-242-7/+7
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Silence warning in test
| * | | | | Silence warning in testSean Griffin2014-06-242-7/+7
|/ / / / / | | | | | | | | | | | | | | | | | | | | We still had one file using `column_for_attribute` when it could return nil, causing deprecation warnings in the tests.
* | | | | `:nodoc: all` does not remove the constants from the API. [ci skip]Yves Senn2014-06-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Need to add individual `:nodoc:` for nested classes / modules to completely remove the constants from the API.
* | | | | add missing `:nodoc:` to `store.rb`. [ci skip]Yves Senn2014-06-241-4/+4
| | | | |
* | | | | Merge pull request #15871 from yuki24/add-model-name-instance-methodDavid Heinemeier Hansson2014-06-242-0/+12
|\ \ \ \ \ | | | | | | | | | | | | Add #model_name instance method to ActiveModel::Naming
| * | | | | Delegate #model_name method to self.classYuki Nishijima2014-06-222-0/+12
| | | | | |
* | | | | | add missing `:nodoc:` for recent refactorings. [ci skip]Yves Senn2014-06-2431-36/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding `# :nodoc:` to the parent `class` / `module` is not going to ignore nested classes or modules. There is a modifier `# :nodoc: all` but sadly the containing class or module will continue to be in the docs. /cc @sgrif
* | | | | | Merge pull request #15810 from maurogeorge/guides-rails-updateYves Senn2014-06-241-0/+23
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add rails:update to the upgrading guides
| * | | | | | Add rails:update to the upgrading guidesMauro George2014-06-191-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | Merge pull request #15881 from mmozuras/remove_unused_paramsRafael Mendonça França2014-06-232-5/+5
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | Remove unused params
| * | | | | | Remove unused param 'conn' from ConnectionPool#releaseMindaugas Mozūras2014-06-231-3/+3
| | | | | | |
| * | | | | | Remove unused param 'klass' from AttributeAssignment#read_otherMindaugas Mozūras2014-06-231-2/+2
| | | | | | |
* | | | | | | Merge pull request #15886 from JuanitoFatas/disable-autolinkZachary Scott2014-06-231-0/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Disable autolink in example code blocks in guides. [ci skip]
| * | | | | | | Disable autolink in example code blocks in guides.Juanito Fatas2014-06-241-0/+6
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /cc @chancancode @robin850 configuration reference: http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/ Related issues: * https://github.com/vmg/redcarpet/issues/334 * https://github.com/docrails-tw/guides/issues/62
* | | | | | | Merge pull request #15882 from aditya-kapoor/remove-unnecessary-requireRafael Mendonça França2014-06-231-1/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | remove unnecessary require from json serialization test cases
| * | | | | | | remove unnecessary require for json serialization test casesAditya Kapoor2014-06-241-1/+0
|/ / / / / / /
* | | | | | | Merge pull request #14113 from murb/patch-1Rafael Mendonça França2014-06-231-5/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Moved explanation of `--mountable` option up
| * | | | | | | Moved explanation of `--mountable` option upMaarten Brouwers2014-02-191-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | The example code uses `--mountable`. In previous version this was followed by an explanation of the `--full` option, which doesn't make sense. Later on in the text this is better explained. I moved this explanation up without repeating too much.
* | | | | | | | Merge pull request #15732 from kuldeepaggarwal/correct-assets-ouputRafael Mendonça França2014-06-232-15/+15
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | [ci skip] correct output for asset_helper methods
| * | | | | | | | [ci skip] correct output for asset_helper methodsKuldeep Aggarwal2014-06-162-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see cc255d3
* | | | | | | | | Merge pull request #15878 from sgrif/sg-null-columnRafael Mendonça França2014-06-235-33/+18
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Revert #15502, and add a deprecation warning instead.
| * | | | | | | | | Add a deprecation cycle for `NullColumn` from `column_for_attribute`Sean Griffin2014-06-235-33/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is public API, and `simple_form` depends on the `nil` return value. We need to go through a deprecation cycle to return a null object. If people want hash access, they can access the hash.
* | | | | | | | | | Merge pull request #15880 from davetoxa/patch-1Zachary Scott2014-06-234-5/+5
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | s/overriden/overridden [ci skip]
| * | | | | | | | | Small typoAnton Cherepanov2014-06-234-5/+5
|/ / / / / / / / /
* | | | | | | | | Merge pull request #15852 from SyntaxBlitz/masterRafael Mendonça França2014-06-231-1/+1
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | | Change double quotes to single quotes in guide
| * | | | | | | | Change double quotes to single quotes in guideTimothy Aveni2014-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve consistency
* | | | | | | | | Merge pull request #15867 from sgrif/sg-rm-column-typesYves Senn2014-06-233-5/+1
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / |/| | | | | | | | Remove unneeded `@column_types` instance variable
| * | | | | | | | Remove unneeded `@column_types` instance variableSean Griffin2014-06-223-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was used more previously, but other uses have been removed.
* | | | | | | | | changelog entries for #15866 and #15848Yves Senn2014-06-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /cc @sgrif
* | | | | | | | | Merge pull request #15848 from sgrif/sg-remove-deprecationYves Senn2014-06-221-8/+1
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Remove old deprecation warning
| * | | | | | | | Remove old deprecation warningSean Griffin2014-06-221-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been around for a couple of versions now, a `NoMethodError` should suffice at this point.
* | | | | | | | | Merge pull request #15865 from sgrif/sg-missing-testYves Senn2014-06-221-0/+20
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add missing test cases for `attribute_names` instance method
| * | | | | | | | | Add missing test cases for `attribute_names` instance methodSean Griffin2014-06-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a class method with the same name that is tested, but not the instance method.
* | | | | | | | | | Merge pull request #15866 from sgrif/sg-reload-attributesYves Senn2014-06-223-5/+8
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | `reload` should fully reload attributes
| * | | | | | | | | `reload` should fully reload attributesSean Griffin2014-06-223-5/+8
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `reload` is meant to put a record in the same state it would be if you were to do `Post.find(post.id)`. This means we should fully replace the attributes hash.