aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Better error message for String#to_dateKelly Stannard2013-01-043-5/+10
| | | | | | | | | | I did this because to_date gives a very unhelpful error message if you do not pass in a correct date. In the process I think this cleans up the code nicely and even better it tends to be slightly faster than the current implementation. Benchmark https://gist.github.com/4440875
* Merge pull request #8755 from robworley/postgresql-ltree-data-typeRafael Mendonça França2013-01-047-3/+77
|\ | | | | Support for PostgreSQL's ltree datatype
| * Support for PostgreSQL's ltree data type.Rob Worley2013-01-047-3/+77
|/
* Merge pull request #8758 from amatsuda/plugin_new_error_messageCarlos Antonio da Silva2013-01-041-1/+1
|\ | | | | Misleading error message that prompts non-existing command [ci skip]
| * misleading error message that prompts non-existing commandAkira Matsuda2013-01-051-1/+1
|/ | | | [ci skip]
* Merge pull request #8754 from amatsuda/app_generator_unused_empty_directoriesGuillermo Iguaran2013-01-047-0/+0
|\ | | | | get rid of unused .empty_directory files in the app generator
| * get rid of unused .empty_directory files in the app generatorAkira Matsuda2013-01-057-0/+0
|/
* Allow use of durations for ActionDispatch::SSL configurationAndrew White2013-01-042-1/+8
|
* Merge pull request #8750 from tricknotes/remove-unnecessary-hCarlos Antonio da Silva2013-01-047-17/+17
|\ | | | | Remove unnecessary `ERB::Util::h`
| * Remove unnecessary `ERB::Util::h`Ryunosuke SATO2013-01-057-17/+17
| | | | | | | | It is automatically applied when strings is unsafe for html.
* | Merge pull request #8747 from asanghi/wsfixCarlos Antonio da Silva2013-01-042-4/+4
|\ \ | | | | | | Remove dangling whitespace in generated database yml files for postgresql and sqlserver [ci skip]
| * | removed dangling whitespace in generated database ymlAditya Sanghi2013-01-042-4/+4
| |/
* | Merge pull request #8746 from tricknotes/remove-h-from-guidesCarlos Antonio da Silva2013-01-042-6/+6
|\ \ | |/ |/| ERB::Util::h is no longer generated in scaffold [ci skip]
| * ERB::Util::h is no longer generated in scaffoldRyunosuke SATO2013-01-052-6/+6
|/
* Merge pull request #8744 from tricknotes/suppress-warningRafael Mendonça França2013-01-041-1/+1
|\ | | | | Suppress warning about IO#lines in Ruby 2.0
| * Suppress warning about IO#lines in Ruby 2.0Ryunosuke SATO2013-01-041-1/+1
|/ | | | actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:99: IO#lines is deprecated; use #each_line instead
* Merge pull request #8739 from franckverrot/remove_activexobjectGuillermo Iguaran2013-01-041-6/+2
|\ | | | | Remove the fallback onto `ActiveXObject("Microsoft.XMLHTTP")`.
| * Remove the fallback onto `ActiveXObject("Microsoft.XMLHTTP")`.Franck Verrot2013-01-041-6/+2
|/
* Merge pull request #8738 from amatsuda/frozen_railsGuillermo Iguaran2013-01-031-2/+2
|\ | | | | another tiny update on generated README
| * No such feature in Rails anymore. That's Bundler's businessAkira Matsuda2013-01-041-2/+2
| | | | | | | | [ci skip]
* | Merge pull request #8736 from tricknotes/apply-varGuillermo Iguaran2013-01-031-1/+2
|\ \ | | | | | | Apply `var` keyword to js at welcome#index
| * | Apply `var` keyword to js at welcome#indexRyunosuke SATO2013-01-041-1/+2
| | |
* | | Merge pull request #8723 from goshakkk/refactor-error-pageGuillermo Iguaran2013-01-033-5/+27
|\ \ \ | |/ / |/| | Move error page js into script tag
| * | move error page js into script tagGosha Arinich2013-01-043-5/+27
| | |
* | | Set the default timezone after the initialization since the configurationRafael Mendonça França2013-01-042-15/+27
| | | | | | | | | | | | | | | | | | now lives in the application initializers. Fix #8711
* | | Refactor infinite comparable definition a bitCarlos Antonio da Silva2013-01-041-15/+19
| | |
* | | Remove unnecessary requiresRafael Mendonça França2013-01-031-2/+0
| | |
* | | Remove assert_nothing_raisedRafael Mendonça França2013-01-036-67/+49
| | |
* | | Merge pull request #7350 from slbug/date_time_ranges_with_infinite_boundsRafael Mendonça França2013-01-0317-7/+199
|\ \ \ | | | | | | | | Added ability to compare date/time with infinity
| * | | Added ability to compare date/time with infinitybUg2013-01-0417-7/+199
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Date, DateTime, Time and TimeWithZone can now be compared to infinity, so it's now possible to create ranges with one infinite bound and date/time object as another bound. Ex.: @range = Range.new(Date.today, Float::INFINITY) Also it's possible to check inclusion of date/time in range with conversion. Ex.: @range.include?(Time.now + 1.year) # => true @range.include?(DateTime.now + 1.year) # => true Ability to create date/time ranges with infinite bound is required for handling postgresql range types.
* | | Use bundler --pre for travis buildsJeremy Kemper2013-01-031-1/+1
| | |
* | | Bump bundler dep to 1.3.0.pre.4+ to introduce 'bundle binstubs <gem>'Jeremy Kemper2013-01-031-1/+1
| | |
* | | Reuse the Column integer converterRafael Mendonça França2013-01-031-1/+1
| | |
* | | Change duplicated test nameRafael Mendonça França2013-01-031-2/+2
| | |
* | | Merge pull request #8734 from jstirk/master-column_writer_to_i_errorsRafael Mendonça França2013-01-034-8/+37
|\ \ \ | |_|/ |/| | Fix undefined method `to_i' introduced in 3.2.9
| * | Fix undefined method `to_i' introduced since 3.2.8Jason Stirk2013-01-044-8/+37
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a bug introduced in 96a13fc7 which breaks behaviour of integer fields. In 3.2.8, setting the value of an integer field to a non-integer (eg. Array, Hash, etc.) would default to 1 (true) : # 3.2.8 p = Post.new p.category_id = [ 1, 2 ] p.category_id # => 1 p.category_id = { 3 => 4 } p.category_id # => 1 In 3.2.9 and above, this will raise a NoMethodError : # 3.2.9 p = Post.new p.category_id = [ 1, 2 ] NoMethodError: undefined method `to_i' for [1, 2]:Array Whilst at first blush this appear to be sensible, it combines in bad ways with scoping. For example, it is common to use scopes to control access to data : @collection = Posts.where(:category_id => [ 1, 2 ]) @new_post = @collection.new In 3.2.8, this would work as expected, creating a new Post object (albeit with @new_post.category_id = 1). However, in 3.2.9 this will cause the NoMethodError to be raised as above. It is difficult to avoid triggering this error without descoping before calling .new, breaking any apps running on 3.2.8 that rely on this behaviour. This patch deviates from 3.2.8 in that it does not retain the somewhat spurious behaviour of setting the attribute to 1. Instead, it explicitly sets these invalid values to nil : p = Post.new p.category_id = [ 1, 2 ] p.category_id # => nil This also fixes the situation where a scope using an array will "pollute" any newly instantiated records. @new_post = @collection.new @new_post.category_id # => nil Finally, 3.2.8 exhibited a behaviour where setting an object to an integer field caused it to be coerced to "1". This has not been retained, as it is spurious and surprising in the same way that setting Arrays and Heshes was : c = Category.find(6) p = Post.new # 3.2.8 p.category_id = c p.category_id # => 1 # This patch p.category_id = c p.category_id # => nil This commit includes explicit test cases that expose the original issue with calling new on a scope that uses an Array. As this is a common situation, an explicit test case is the best way to prevent regressions in the future. It also updates and separates existing tests to be explicit about the situation that is being tested (eg. AR objects vs. other objects vs. non-integers)
* | Merge pull request #8732 from amatsuda/readme_call_yieldRafael Mendonça França2013-01-031-1/+1
|\ \ | | | | | | a tiny fix in the generated README
| * | no, call <%= yield %>Akira Matsuda2013-01-041-1/+1
|/ /
* | Merge pull request #8731 from amatsuda/readme_dir_treeGuillermo Iguaran2013-01-031-11/+15
|\ \ | | | | | | update directory tree in the generated README
| * | update directory tree in the generated READMEAkira Matsuda2013-01-041-11/+15
| | |
* | | Add documentation to ActionDispatch::Http::UploadedFile#headersRafael Mendonça França2013-01-031-0/+1
| | | | | | | | | | | | [ci skip]
* | | Merge pull request #8730 from robin850/masterRafael Mendonça França2013-01-032-3/+3
|\ \ \ | | | | | | | | Fix missing spaces in method definitions
| * | | Fix missing spaces before and after equal signs in method definitionsRobin Dupret2013-01-032-3/+3
| | | |
* | | | Merge pull request #8729 from timraymond/help_message_for_install_scriptRafael Mendonça França2013-01-031-0/+5
|\ \ \ \ | | | | | | | | | | Adding a usage message to install.rb script
| * | | | Adding a usage message to install.rb scriptTim Raymond2013-01-031-0/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Previously, invoking the install.rb script with zero arguments caused it to attempt to install all gems without a version suffix, which would fail spectacularly. Failing gracefully with a usage message is more helpful to a first-time user.
* | | | Merge pull request #8728 from amatsuda/model_all_returns_a_relationRafael Mendonça França2013-01-031-1/+1
|\ \ \ \ | |/ / / |/| | | A small fix for an AR test case
| * | | need to to_a the Relation to execute SQL hereAkira Matsuda2013-01-041-1/+1
| |/ /
* | | Merge pull request #8727 from robin850/patch-2Rafael Mendonça França2013-01-031-1/+0
|\ \ \ | | | | | | | | Remove a useless TODO comment
| * | | Remove a useless TODO commentRobin Dupret2013-01-031-1/+0
|/ / /
* | | Merge pull request #8705 from amparo-luna/change_update_attributes_to_updateGuillermo Iguaran2013-01-0338-132/+181
|\ \ \ | | | | | | | | Rename update_attributes method to update