Skip to content
This repository
  • 10,000 commits
  • 223 files changed
  • 60 comments
  • 53 contributors
This comparison is big! We're only showing the most recent 250 commits
May 19, 2012
Rafael Mendonça França Merge pull request #6396 from kennyj/dont_use_assert_block
Don't use assert_block method. It will be removed.
777d539
pmahoney Synchronize read and modification of @reserved_connections hash to av…
…oid concurrency error.
c2d416f
Oscar Del Ben Getting started guide has been completely rewritten and edited. 05fdb31
Oscar Del Ben Typo fae4a26
Oscar Del Ben Revert typo ba896d3
Aaron Patterson Merge pull request #6398 from pmahoney/threadsafe-connection-pool
Synchronize read and modification of @reserved_connections
23fad29
Aaron Patterson Merge pull request #6397 from kennyj/fix_translate_exception
Fix a problem of translate_exception method in a Japanese (non English) environment.
fa41c92
Francesco Rodríguez add CollectionProxy#find documentation 952737a
Francesco Rodríguez add CollectionProxy#select documentation a6940f2
Piotr Sarnacki Merge pull request #5631 from avakhov/ac-log-subsriber-small-refac
Make AC::LogSubscriber#send_file like #send_data
da97cf0
Piotr Sarnacki Merge pull request #5702 from oscardelben/patch-4
Call undefine_attribute_methods only when defining new attributes
cae1ca7
May 20, 2012
Toshinori Kajihara Fix a problem of translate_exception method in Japanese. 2fe2813
Henrik Hodne Update documentation for AbstractController::Base 7eb09ae
Henrik Hodne Remove blank trailing comments
For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace
with the first match, and voilà! Note that the regex matches a little bit too
much, so you probably want to `git add -i .` and go through every single diff
to check if it actually should be changed.
fa6d921
Dmitry Vorotilin Show in log correct wrapped keys 32a433e
Piotr Sarnacki Improve docs for `try` by adding note on `BasicObject`
[ci skip] closes #5790
2575508
José Valim Merge pull request #6050 from route/wrapped_keys_in_log
Show in log correct wrapped keys
3655d66
David Chelimsky Raise Assertion instead of RoutingError for routing assertion failures.
Before this change, assert_recognizes, assert_generates, and
assert_routing raised ActionController::RoutingError when they failed to
recognize the route.

This commit changes them to raise Assertion instead. This aligns with
convention for logical failures, and supports reporting tools that care
about the difference between logical failures and errors e.g. the
summary at the end of a test run.

- Fixes #5899
dcce011
José Valim Merge pull request #6399 from dchelimsky/issue-5899
Raise Assertion instead of RoutingError for routing assertion failures.
ed024f6
Vijay Dev fix closing tag [ci skip] ad3f47d
Andrew White Correct order of expected and actual arguments 972376a
Andrew White Raise ActionController::BadRequest for malformed parameter hashes.
Currently Rack raises a TypeError when it encounters a malformed or
ambiguous hash like `foo[]=bar&foo[4]=bar`. Rather than pass this
through to the application this commit captures the exception and
re-raises it using a new ActionController::BadRequest exception.

The new ActionController::BadRequest exception returns a 400 error
instead of the 500 error that would've been returned by the original
TypeError. This allows exception notification libraries to ignore
these errors if so desired.

Closes #3051
66eb3f0
Andrew White Return 400 Bad Request for URL paths with invalid encoding.
Passing path parameters with invalid encoding is likely to trigger errors
further on like `ArgumentError (invalid byte sequence in UTF-8)`. This will
result in a 500 error whereas the better error to return is a 400 error which
allows exception notification libraries to filter it out if they wish.

Closes #4450
3fc561a
Andrew White Escape the extension when normalizing the action cache path.
Although no recognized formats use non-ASCII characters, sometimes they
can be included in the :format parameter because of invalid URLS. To
prevent encoding incompatibility errors we need to escape them before
passing the path to URI.unescape.

Closes #4379
79b38c3
Piotr Sarnacki Revert "Merge pull request #5702 from oscardelben/patch-4"
This reverts commit cae1ca7, reversing
changes made to da97cf0.

These changes break the build, it needs more investigation.
08a5b10
Ivan Kukobko fixed typo in word finiding 45d059b
Carlos Antonio da Silva Merge pull request #6408 from ivankukobko/master
Fixed typo in AR test name
46fcce9
Francesco Rodríguez update CollectionProxy#destroy_all documentation 03402d2
Rafael Mendonça França Fix CHANGELOG order and add a brief description of the changes in the
Action Pack in the upgrading guide. [ci skip]
a78ee05
José Valim Merge pull request #6407 from pinetops/565c1b0a0772ac6cf91c77e9285806…
…f7b028614c

Template concurrency fixes
Conflicts:

	actionpack/lib/action_view/template.rb
74c4e7b
Piotr Sarnacki Fix generators to help with ambiguous `ApplicationController` issue
In development mode, dependencies are loaded dynamically at runtime,
using `const_missing`. Because of that, when one of the constants is
already loaded and `const_missing` is not triggered, user can end up
with unexpected results.

Given such file in an Engine:

```ruby
module Blog
  class PostsController < ApplicationController
  end
end
```

If you load it first, before loading any application files, it will
correctly load `Blog::ApplicationController`, because second line will
hit `const_missing`. However if you load `ApplicationController` first,
the constant will be loaded already, `const_missing` hook will not be
fired and in result `PostsController` will inherit from
`ApplicationController` instead of `Blog::ApplicationController`.

Since it can't be fixed in `AS::Dependencies`, the easiest fix is to
just explicitly load application controller.

closes #6413
7c95be5
pmahoney Make connection pool fair with respect to waiting threads. d06674d
May 21, 2012
Piotr Sarnacki More info on commit messages in contributing guide
Add more info on how to write a good commit messages along with
example showing nicely formatted commit message.

Rails git history does not look too well when you try to figure out why
particular changes were introduced. We can do much better than that and
it's never too late to start.
ae8b09c
Francesco Rodríguez add CollectionProxy#destroy documentation d831734
Andrii Vakarev Refactoring: turn unless/else into if/else ff83df3
Jeremy Kemper Merge pull request #6424 from avakarev/refactoring_unless-else
Refactoring: just turn unless/else into if/else
9c3cd9c
Aaron Patterson Merge pull request #6143 from senny/composed_of_converter_returns_nil
allow the :converter Proc form composed_of to return nil
525839f
Francesco Rodríguez improve CollectionProxy#destroy documentation 1f5c1a1
Francesco Rodríguez add CollectionProxy#reload documentation 158a71b
Francesco Rodríguez fix CollectionProxy documentation markup ab2e2a9
Aaron Patterson Merge pull request #6416 from pmahoney/threadsafe-connection-pool
Make connection pool fair with respect to waiting threads.
d2901f0
Aaron Patterson Merge pull request #2549 from trek/RoutingErrorForMissingControllers
When a route references a missing controller, raise ActionController::RoutingError with clearer message
513a052
pinetops Make the Resolver template cache threadsafe - closes #6404
The Template cache in the Resolver can be accessed by multiple threads
similtaneously in multi-threaded environments. The cache is implemented
using a Hash, which isn't threadsafe in all VMs (notably JRuby).

This commit extracts the cache to a new Cache class and adds mutexes to
prevent concurrent access.
685192b
pinetops More granular locking of the Resolver template cache
In order to avoid holding a global lock when doing template
resolution, instead add individual locks on a per cache entry
basis. The global lock is now only used for manipulation of the main
cache data structure.
719b008
Aaron Patterson Merge pull request #6425 from pinetops/resolver_concurrency_fix
Resolver concurrency fix
254c042
José Valim Revert "Merge pull request #6425 from pinetops/resolver_concurrency_fix"
This reverts commit 254c042, reversing
changes made to 513a052.
776ea10
Marc-André Lafortune Fix bug when Rails.application is defined but is nil. See #881 89ebd28
Carlos Galdino Add HTML5 input[type="color"] helper 1ce4b5b
Carlos Galdino Add several HTML5 input helpers
The input types added are:

- input[type="month"]

- input[type="week"]

- input[type="datetime"]

- input[type="datetime-local"]
b02d14a
Carlos Antonio da Silva Merge pull request #5156 from avakhov/class-attribute-instance-accessor
Add instance_accessor option to class_attribute
f260dc5
Carlos Antonio da Silva Refactor aggregation writer method
Only constantize class_name once.
d5d9a28
Carlos Antonio da Silva Remove not used variables from connection poll test
These variables were issuing some "not used" warnings.
03886d8
Godfrey Chan Restore the frozen state on rollback. Fixes #6417.
Currently, when saving a frozen record, an exception would be thrown
which causes a rollback. However, there is a bug in active record that
"defrost" the record as a side effect:

    >> t = Topic.new
    => #<Topic id: nil, ...>
    >> t.freeze
    => #<Topic id: nil, ...>
    >> t.save
    RuntimeError: can't modify a frozen Hash
    >> t.frozen?
    => false
    >> t.save
    => true

This patch fixes the bug by explictly restoring the frozen state on the
attributes Hash after every rollback.
cb847b9
Carlos Antonio da Silva Merge pull request #6429 from marcandre/fix_test_request
Fix bug when Rails.application is defined but is nil. See #881
c5fc159
Aaron Patterson using __method__ for the command method calls edb87b1
Michael Koziarski Merge pull request #5125 from winston/log_exception_when_cache_read_f…
…ails

#read_entry in ActiveSupport::Cache::FileStore should log details of the exception when an exception is thrown
e44009a
Piotr Sarnacki Merge pull request #6420 from chancancode/master_restore_frozen_state…
…_on_rollback

Restore frozen state on rollback, fixes #6417
1447aca
Francesco Rodríguez add CollectionProxy#delete_all documentation f9a718e
Francesco Rodríguez update CollectionProxy#delete_all documentation 1bcd5e4
Francesco Rodríguez update CollectionProxy#clear documentation 8281194
Piotr Sarnacki Merge pull request #6150 from avakhov/dbconsole-fixes
Rails db console improvements
d22859e
May 22, 2012
Alexey Vakhov Add instance_accessor option to class_attribute e4569b5
Alexey Vakhov Fix AR preloader example 5b7b705
Alexey Vakhov Use relative path to sqlite3 db in `rails db` command
Rails uses sqlit3 db file with a path relative to the rails root. It
allows to execute server not from rails root only. For example you
can fire `./spec/dummy/script/rails s` to start dummy application
server if you develop some engine gem.

Now the `rails db` command uses relative paths also and you can explore
your dummy db via `./spec/dummy/script/rails db` command.
a060c41
Alexey Vakhov Fix `rails db -h` and cosmetic fixes in usage banners
Ruby tries to use '-h' as short version of '--header' by default
https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1372-1381.
To force `rails db -h` prints an usage message we should add the `-h`
options explicitly.
1fed1f1
Gaurish Sharma Fix broken link 4220290
Alexey Vakhov Remove obsolete comment from generator gem method
This comment about :env option for gem method was actual for rails 2.3
without bundler. Now bundler uses grups for this goal.
09be692
Jan remove useless require 3ed92c8
Piotr Sarnacki Use require_dependency in generated controllers
Using require in development mode will prevent required files from
reloading, even if they're changed. In order to keep namespaced
application_controller reloadable, we need to use require_dependency
instead of require.
29d17d3
Piotr Sarnacki Merge pull request #6435 from janx/remove_useless_require
remove useless require
0638e6b
Alexey Vakhov Use new hash syntax for generators gem method
The Gemfile of new application uses ruby 1.9 hashes. Gem method of
generators should use them too. It prevents from mixing two kinds of
syntax in one file.
fe7038e
José Valim Merge pull request #6437 from avakhov/gen-gem-method
Use new hash syntax for generators gem method
f909e14
Jan refactor lazy_load_hooks load position a807db9
José Valim Merge pull request #6439 from janx/remove_useless_require
refactor lazy_load_hooks load position, fix #6435
6b9f077
Gaurish Sharma Remove Obsolute root specifiying short syntax
This syntax does not seem to work. Throws the error
  "can't convert String into Hash (TypeError)"

Tested on:
* Ruby 1.9.3
* Rails 3.2.3
feaa7b3
Convert Hash to HashWithIndifferentAccess in ActiveRecord::Store.
In order to make migration from 3.x apps easier, we should try to
convert
Hash instances to HashWithIndifferentAccess, to allow accessing values
with both symbol and a string. This is follow up to changes in 3c0bf04.
940c135
Gaurish Sharma Move root method at TOP of routes file
Made the change as per the following text in routing guide:-
"You should put the root route at the top of the file,
because it is the most popular route and should be matched first."

However, if root is best left at bottom. We will change to fix that text
43fa48e
Jeremy Kemper Merge pull request #6368 from Antiarchitect/store-indifferent-access
Support migrating from Hash to HashWithIndifferentAccess for accessing attributes.
d3ee0a2
Santiago Pastorino require active_support/lazy_load_hooks where is needed 38293ea
Jeremy Kemper Merge pull request #6440 from gaurish/route_move_top
Move root method at TOP of routes file
1d4d731
Francesco Rodríguez remove repeated documentation in CollectionProxy#clear d1cab8e
Santiago Pastorino Fix the build 344ea04
Oscar Del Ben The initialization guide will cover Rails 4 acdf8ac
Oscar Del Ben [Guides] change rails bin section d4d8794
Oscar Del Ben [Guides] Review bin/rails section 987a74d
Oscar Del Ben [Guides] Change bundler section ba55dd5
Oscar Del Ben [Guides] Update rails commands section 63f094b
Francesco Rodríguez add CollectionProxy#build documentation 2c62dd6
Francesco Rodríguez adding :call-seq: to CollectionProxy methods 21f4c2e
Francesco Rodríguez add more examples to CollectionProxy#find e0859e5
Francesco Rodríguez add CollectionProxy#create documentation 9c38cfc
Francesco Rodríguez add CollectionProxy#create! documentation 7e5beca
Francesco Rodríguez add :call-seq: to +first+ and +last+ CollectionProxy methods 3e847af
Francesco Rodríguez add CollectionProxy#size documentation f539d98
Francesco Rodríguez add CollectionProxy#length documentation eb2c0a4
Rafael Mendonça França Revert "Merge pull request #6416 from pmahoney/threadsafe-connection-…
…pool"

This reverts commit d2901f0, reversing
changes made to 525839f.

Conflicts:
	activerecord/test/cases/connection_pool_test.rb

Reason: This change broke the build (http://travis-ci.org/#!/rails/rails/builds/1391490)
and we don't have any solution until now. I asked the author to try to
fix it and open a new pull request.
7c69e2d
Rory O’Kane clarified how file naming affects load order of initializers f09c84c
Rafael Mendonça França Merge pull request #6433 from parndt/fix_typo
Fixed typo new_defautls -> new_defaults.
5089d65
Jeremy Kemper Merge pull request #6359 from carlosgaldino/add-html5-inputs
Add HTML5 color and date/time inputs
65d2a60
Aaron Patterson initialize our instance variables 8662722
Aaron Patterson initialize instance variables 580333f
Aaron Patterson use RUBY_PLATFORM in case of cross compiled ruby 1ca1b1a
Aaron Patterson use File.realpath and avoid making Pathname objects 3f870f6
Aaron Patterson I guess we have to return a pathname object. o_O d7de7a7
Carlos Galdino Refactor date related helpers a9a9e8a
Carlos Galdino Add tests for time_field and date_field helpers
These tests check the values of 'min' and 'max' input attrs
30847b4
use ApplicationName::Application instead of ActionController::Dispatc…
…her.new since Dispatcher class no longer exists
83f62a0
Rafael Mendonça França Merge pull request #6452 from carlosgaldino/refactor-date-helpers
Refactor date related input helpers
41cfe17
dgm Fix incorrect example for fields_for - without the '=' it will not ou…
…tput anything.
2227064
update loaded middlewares and use of Rack::Server instead of Rack::Bu…
…ilder
56ad6ca
use ActionDispatch::MiddlewareStack instead of ActionController::Midd…
…lewareStack
7cabb57
José Valim Merge pull request #6453 from parndt/session_keys
Added session.keys and session.values back to ActionDispatch::Request::Session
cb92efb
May 23, 2012
Philip Arndt Fixed typo new_defautls -> new_defaults.
* Added tests for 'else' case in ActionView::Helpers::TranslationHelper#wrap_translate_defaults
* Also updated the testing syntax of translation.html_safe? asserts to provide better output upon failure.
40c0b3a
Philip Arndt Added ActionDispatch::Request::Session#keys and ActionDispatch::Reque…
…st::Session#values
6ac458d
Uģis Ozols Remove unnecessary comment. bd9953f
Carlos Antonio da Silva Merge pull request #6455 from ugisozols/master
Remove unnecessary comment.
90d8c8a
Angelo Capilleri changed xml type datetime to dateTime, fixes #6328
XmlMini define the xml 'datatime', but according to
http://www.w3.org/TR/xmlschema-2/#dateTime could be better
change this to 'dateTime' with upper case letter 'T.
So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime'

add the changing to the changelog
5646d65
Carlos Antonio da Silva Merge pull request #6446 from acapilleri/mini_xml_4
Change xml type datetime to dateTime
a6d0e37
Mark McSpadden Add Hash#transform_keys and Hash#transform_keys! and refactor *_keys …
…methods to use them.
6ff8873
Rafael Mendonça França Merge pull request #6259 from markmcspadden/hash_transform_keys
Add Hash#transform_keys and Hash#transform_keys!
c1487f6
Lucas Húngaro Adding deep versions of stringify_keys and symbolize_keys (plain and …
…bang) for nested hashes
a4bb195
Oscar Del Ben [Guides] Rewrite server start section 05a4d8b
Oscar Del Ben [Guides] Rewrite server start section 13612ae
Oscar Del Ben [Guides] Fix sample code 07f7321
Jonathan Rochkind ConnectionPool wait_timeout no longer used for different types of tim…
…eouts. #6441

An AR ConnectionSpec `wait_timeout` is pre-patch used for three
different things:

* mysql2 uses it for MySQL's own wait_timeout (how long MySQL
  should allow an idle connection before closing it), and
  defaults to 2592000 seconds.
* ConnectionPool uses it for "number of seconds to block and
  wait for a connection before giving up and raising a timeout error",
  default 5 seconds.
* ConnectionPool uses it for the Reaper, for deciding if a 'dead'
  connection can be reaped. Default 5 seconds.

Previously, if you want to change these from defaults, you need
to change them all together. This is problematic _especially_
for the mysql2/ConnectionPool conflict, you will generally _not_
want them to be the same, as evidenced by their wildly different
defaults. This has caused real problems for people #6441 #2894

But as long as we're changing this, forcing renaming the
ConnectionPool key to be more specific, it made sense
to seperate the two ConnectionPool uses too -- these two
types of ConnectionPool timeouts ought to be able to be
changed independently, you won't neccesarily want them
to be the same, even though the defaults are (currently)
the same.
cb6f839
Carlos Antonio da Silva Merge pull request #6060 from lucashungaro/master
Adding deep versions of stringify_keys and symbolize_keys (plain and bang) for nested hashes
541429f
Matt Griffin Add license field to gemspecs, by Matt Griffin 6c7b250
Aaron Patterson Merge pull request #6463 from jrochkind/connection_pool_timeout_keys
ConnectionPool wait_timeout no longer used for different types of timeouts. #6441
43893f3
Vijay Dev copy edit[ci skip] 2642c29
Vijay Dev Revert "Remove blank trailing comments"
This reverts commit fa6d921.

Reason: Not a fan of such massive changes. We usually close such changes
if made to Rails master as a pull request. Following the same principle
here and reverting.

[ci skip]
1ad0b37
Vijay Dev Revert "Remove Obsolute root specifiying short syntax"
This reverts commit feaa7b3.

Reason: Incorrect change. That's a Rails 4 feature and will not
obviously work in 3.2.3.

[ci skip]
d31b765
José Valim Merge pull request #6462 from grosser/feature/licenses
Add license field to gemspecs, by Matt Griffin
92fd212
Vijay Dev copy edits in collection proxy docs [ci skip] 1c94868
Vijay Dev Merge pull request #6194 from ayrton/optimized_images
Optimizing all images used in the guides
030e04f
Vijay Dev Merge pull request #6383 from oscardelben/add_oscardelben_to_authors
Add oscardelben to authors
9ae0c66
Vijay Dev Merge branch 'master' of github.com:lifo/docrails 91305ad
Godfrey Chan Added instructions for backporting changes to guides.
I was looking for instructions on backporting changes the other day and
wasn't able to find it anywhere. I updated the contrib guides based on
the disccusion in #6420, #6215 and #6447.
c97fb88
Mark McSpadden Add Hash#deep_transform_keys and Hash#deep_transform_keys! Also conve…
…rt deep_*_keys to use deep_transform_keys.
2b5b60f
Rafael Mendonça França PGconn doesn't accepts :checkout_timeout option.
This option was added on cb6f839
renaming the :wait_timeout option.

Fix build http://travis-ci.org/#!/rails/rails/jobs/1413405
925f6bd
Rafael Mendonça França Whitespaces :scissors: 82b05fb
Rafael Mendonça França Merge pull request #6466 from markmcspadden/hash_deep_transform_keys
Add Hash#deep_transform_keys and Hash#deep_transform_keys! Also convert ...
7a23ada
Aaron Patterson use File.join to decrease dependencies on Pathname 4e5175e
Aaron Patterson removing more pathnameisms 4001835
Aaron Patterson require the constants we use. ensure that root always returns a Pathname d77b576
Aaron Patterson Revert "require the constants we use. ensure that root always returns…
… a Pathname"

This reverts commit d77b576.
9875574
Aaron Patterson use File.join rather than depend on Pathname 880481a
Piotr Sarnacki Merge pull request #6447 from chancancode/add_backporting_instruction…
…s_to_contrib_guides

Added instructions for backporting changes to guides.
95c49f2
May 24, 2012
Mikhail Dieterle typos 03fa708
Philip Arndt Fixed backward incompatibility for engines.
- Many engines rely on being able to join directories to the Rails root:

    Rails.root.join('somedir')

- This was now impossible because Rails.root returned a String:

    NoMethodError: undefined method `join' for "/code/myrailsapp":String

- This was broken in 4001835
66db0b9
José Valim Merge pull request #6471 from parndt/rails_root_should_be_join_able
Fixes possible backward incompatibility
abccf82
Rory O’Kane grammar fixes in a tip in Rails routing guide aa54d29
Rory O’Kane capitalize HTML5 in Getting Started Guide f1c2727
Oscar Del Ben [Guides] Add sprockets to list of loaded frameworks f2c60c7
Oscar Del Ben [Guides] Update ruby version check f819b90
Oscar Del Ben [Guides] Add extract_options section 27874a8
Oscar Del Ben [Guides] Rewrite Rails application section cd6aa9f
Oscar Del Ben [Guides] Add core_ext/object section 2ccc210
Oscar Del Ben [Guides] Update rack example 0b11840
Richard Schneeman /rails/info/routes path shows routing information
Will show similar contents to the output of `$ rake routes` in the browser in development. This speeds the time required to generate routes, since the application is already initialized.
cb44e0f
Richard Schneeman Rails::InfoController tests passing
This includes new tests for /rails/info/routes
c3e3102
Andrew White Merge pull request #6461 from schneems/schneems/sextant-routes
View your Routes without waiting on Rake
8186754
Rafael Mendonça França Use deep_dup in the deep_transform_keys tests.
Using only dup make some tests to not catch up an implementation error
because the methods were changing the nested hashes.

Related to:
541429f#L1R96
b0ebdf3
Carlos Antonio da Silva Merge pull request #5925 from Juanmcuello/pg_structure_dump
Quote arguments in db:structure:dump for PostgreSQL.
6775ad8
Carlos Antonio da Silva Add missing requires for deep_dup and hash ext test 317f494
Aaron Patterson `name` should be public. d5dc462
Aaron Patterson do not set the ENGINE_PATH to nil d476129
Richard Schneeman remove unnecessary test from route_inspect_test 4459125
Rafael Mendonça França Merge pull request #6481 from schneems/schneems/sextant-routes
Remove Unnecessary Test from route_inspect_test
641ab7c
José Valim Merge pull request #6482 from waseem/fix_build_4008
Fixes build 4008.1
ec8c4b5
May 25, 2012
Waseem Ahmad Fixes build 4008.1
This fixex build 4008.1[1] because of the changes made in

4001835

[1] http://travis-ci.org/#!/rails/rails/jobs/1429671
baa3363
Alexey Vakhov Fix ActiveSupport Cache decrement method description 05ae220
José Valim Remove implicit dependency on pathname 73db73f
José Valim Merge pull request #4785 from ayamomiji/add-self-to-allow-method-name…
…-using-ruby-keyword

add `self.` to allow method name using ruby keyword
56417b4
Alexey Vakhov Update examples of Array #in_groups and #in_groups_of
Examples should be not square to visually underline a difference between
Array#in_groups and Array#in_groups_of.
d834111
Mikhail Vaysman references to the old behavior removed 17eedd8
Mikhail Vaysman Merge branch 'master' of github.com:lifo/docrails 852ff78
Alexey Vakhov Clean Date#beginning_of_month description
Unnecessary peace of text was injected at
507da04 by mistake.
a1a16de
Alexey Vakhov Fix Range#sum optimized version
At 1bd4d1c was added Range#sum
optimized version for arithmetic progressions. This improvment injected
a defect with not integer range boundaries. The defect was fixed by
e0adfa8. The second commit really
disabled optimization at all because in Ruby integer-valued numbers are
instances of Fixnum and Bignum classes. We should #use is_a?
(#kind_of?) method instead #instance_of? to check if value is numerical:

    1.class                 # => Fixnum
    1.instance_of?(Integer) # => false
    1.is_a?(Integer)        # => true

    -100_000_000_000.class                 # => Bignum
    -100_000_000_000.instance_of?(Integer) # => false
    -100_000_000_000.is_a?(Integer)        # => true

Moreover original implementation of Range#sum has a defect with reverse
range boundaries. If the first boundary is less than the second range is
empty. Current commit fixes and tests this case too.
b4167d3
Rafael Mendonça França Merge pull request #6487 from avakhov/range-sum-optimization
Fix Range#sum optimized version
8e1d46c
Alexey Vakhov Fix unbalanced braces in Hash#typecast_xml_value internal comment cb25bce
Edward Tsech Add comment for attr_accessible/attr_protected :as option. [ci skip] b98a343
Rafael Mendonça França Merge pull request #5244 from fotos/myqsl2_wait_timeout
Maximum wait_timeout on Windows is 2147483
1c3469b
[getting started] specify that rails new blog executes bundle install 470c151
[getting started] specify what # and $ denotes in the prompt in unix-…
…like OSs
3e7d43b
Oscar Del Ben [Guides] Add inflector example 2614926
Oscar Del Ben [Guides] Add missing file descriptions 4ce51e3
[getting started] specify which kind of temporary files are stored in…
… the /tmp folder
10f16e6
[getting started] Update Setting the Application Home Page to show th…
…e get "welcome/index" route
12111e2
Tadas Tamošauskas Update paths in action_view_overview raislguide to reflect asset pipe…
…line conventions.
096cc0e
Aaron Patterson Merge pull request #5872 from evtuhovich/prepared_statement_fix
Remove prepared statement from system query in postgresql adapter
0777773
Mark McSpadden Reorder deep_symbolize_keys methods 1d485d5
Rafael Mendonça França Merge pull request #6493 from markmcspadden/hash_keys_order_methods
Reorder deep_symbolize_keys methods
85c56b0
Aaron Patterson Merge pull request #4132 from Juanmcuello/clone_structure
Reset postgreSQL search path in db:test:clone_structure.
1ca3133
Francesco Rodríguez add CollectionProxy#delete documentation 29463aa
Francesco Rodríguez add CollectionProxy#to_ary documentation 390d86a
Francesco Rodríguez add CollectionProxy#count documentation f81798d
Francesco Rodríguez add CollectionProxy#== documentation bb55f52
Francesco Rodríguez add :nodoc: to CollectionProxy#initialize 7a323e2
May 26, 2012
Ryan Bigg [routing guide] Add mention of get '/:username' route
This is fairly common in Rails applications and is requested a lot of the time on Stack Overflow and #rubyonrails
9122143
Vijay Dev Merge pull request #6491 from rafmagana/getting_started_update_settin…
…g_app_home_page

[getting started] Update Setting the Application Home Page to show the generated get "welcome/index" route
4b91183
Vijay Dev Merge pull request #6454 from rafmagana/guides_rails_on_rack
[guides] Update rails on rack
e8cac28
Vijay Dev make it explicit that bundle install at the time of app creation
installs only the gems that are already in the gemfile

[ci skip]
6999b36
Vijay Dev fix mention of ruby versions that rails 4 won't run on [ci skip] 0673153
Vijay Dev Merge branch 'master' of github.com:lifo/docrails 575e77b
Vijay Dev some small corrections & wrapping changes in the initialization guide
This guide is currently a wip and pending reviews. [ci skip]
2114e21
Li Ellis Gallardo Truncate now has the ability to receive a html option that allows it …
…to call rails helpers.

This way if my text is long I don't have to do something like this:

.text
= truncate(@text, :length => 27)

 if @text.size >= 27
    = link_to "continue", notes_path, ....."")
38813da
Rafael Mendonça França Merge pull request #6031 from lellisga/truncate_readme
Truncate now has the ability to receive a html option that allows it to call rails helpers.
9c8132c
Rafael Mendonça França Test that the block used in truncate is escaped if it is not HTML safe
Refactoring the truncate method to not do a sort-circuit return
4ce3b5d
Deepak Kannan Small correction to contributing_to_rails in the section for testing …
…ActiveRecord


Initially the guide suggests to install gems via "bundle install --without db" 
But tests for ActiveRecord need to install the gems in db group also, like mysql.
The patch clears the bundler options in ".bundle/config" and installs all the gems in Gemfile
0cfbaa0
Rafael Mendonça França Update the documentation and add CHANGELOG entry eedc513
Rafael Mendonça França Add `:escape` option for `truncate`
This options can be used to not escape the result by default.
2c2b0be
Deepak Kannan Revert "Small correction to contributing_to_rails in the section for …
…testing ActiveRecord
" This reverts commit 0cfbaa0.
Sorry did not see the section on MySql and PostgreSQL

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	modified:   guides/source/contributing_to_ruby_on_rails.textile
#
ef4b3ee
Add some information about handle_unverified_request to guides. 7d8474e
Francesco Rodríguez add examples to Hash#deep_stringify_keys and Hash#deep_symbolize_keys…
… [ci skip]
ac50b63
Francesco Rodríguez update Hash documentation with 1.9 syntax [ci skip] 29713d7
Francesco Rodríguez add CollectionProxy#uniq documentation 55c0527
Francesco Rodríguez remove unnecessary ruby 1.8 reference from active_record/core [ci skip] 4df16f3
Francesco Rodríguez update Module#mattr_accessor documentation [ci skip] 4f031c8
May 27, 2012
Vijay Dev Update initialization guide [ci skip]
* update rails versions
* remove outdated code snippets
* few more corrections
4c34cb3
Piotr Sarnacki Fix railties_order when application object is passed
railites_order method, introduced in 40b19e0, had a bug that was causing
loading application instance twice in initializers if railties_order
already included application instance. So for example

    railties_order = [Foo::Engine, :main_app, Bar::Engine]

would result in such railties array:

    [MyApp::Application, Foo::Engine, MyAppApplication, Bar::Engine]

In order to fix it, we need to check for existence of application in
both railties_order and railties arrays.
cf992fb
Vijay Dev copy edits [ci skip] 903a9d5
Vijay Dev Merge branch 'master' of github.com:lifo/docrails 523d0f0
Andrew Mutz Moving NumberHelpers from ActionView to ActiveSupport 155cd5e
May 28, 2012
Piotr Sarnacki Fix sorting of helpers from different paths
When more than one directory for helpers is provided to a controller, it
should preserver the order of directories. Given 2 paths:

    MyController.helpers_paths = ["dir1/helpers", "dir2/helpers"]

helpers from dir1 should be loaded first. Before this commit, all
helpers were mixed and then sorted alphabetically, which essentially
would require to rename helpers to get desired order.

This is a problem especially for engines, where you would like to be
able to predict accurately which engine helpers will load first.

(closes #6496)
e4aaac1
José Valim Merge pull request #6315 from appfolio/moving_number_helper_methods_t…
…o_active_support

Moving number helper from ActionView to Active Support
135f620
Jared Beck Fix handling of negative zero in number_to_currency 371508c
José Valim Merge pull request #6512 from jaredbeck/fix_number_to_currency_neg_fo…
…rmat

Fix handling of negative zero in number_to_currency
5acb10d
Steve Purcell Don't enable validations when passing false hash values to ActiveMode…
…l.validates

Passing a falsey option value for a validator currently causes that validator to
be enabled, just like "true":

    ActiveModel.validates :foo, :presence => false

This is rather counterintuitive, and makes it inconvenient to wrap `validates` in
methods which may conditionally enable different validators.

As an example, one is currently forced to write:

      def has_slug(source_field, options={:unique => true})
        slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? }
        before_validation slugger
        validations = { :presence => true, :slug => true }
        if options[:unique]
          validations[:uniqueness] = true
        end
        validates :slug, validations
      end

because the following reasonable-looking alternative fails to work as expected:

      def has_slug(source_field, options={:unique => true})
        slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? }
        before_validation slugger
        validates :slug, :presence => true, :slug => true, :uniqueness => options[:unique]
      end

(This commit includes a test, and all activemodel and activerecord tests pass as before.)
b3ccd7b
José Valim Merge pull request #6517 from purcell/validates-false-value
Don't enable validations when passing false hash values to ActiveModel.validates
f5e26bc
Sergey Nartimov remove unnecessary require
AS::Multibyte are no longer required by access and filters string
core extensions.
7dd80d6
Sergey Nartimov make AS::Multibyte::Chars work w/o multibyte core ext
Use ActiveSupport::Multibyte::Chars.new instead of String#mb_chars.
It allows to use ActiveSupport::Multibyte::Chars without requiring
String multibyte core extension.
d64b254
José Valim Merge pull request #6522 from lest/patch-1
ActiveSupport require and dependencies
68f23be
James Mead Exceptions like Interrupt should not be rescued.
Neither Test::Unit nor MiniTest rescue exceptions like Interrupt or
NoMemoryError, but ActiveSupport::Testing::SetupAndTeardown#run which
overrides MiniTest::Unit::TestCase#run rescues them.

Rescuing an Interrupt exception is annoying, because it means when you
are running a lot of tests e.g. when running one of the rake test tasks,
you cannot break out using ctrl-C.

Rescuing exceptions like NoMemoryError is foolish, because the most
sensible thing to happen is for the process to terminate as soon as
possible.

This solution probably needs some finessing e.g. I'm not clear whether
the assumption is that only MiniTest is supported. Also early versions
of MiniTest did not have this behaviour. However, hopefully it's a
start.

Integrating with Test::Unit & MiniTest has always been a pain. It would
be great if both of them provided sensible extension points for the kind
of things that both Rails and Mocha want to do.
b057fab
Francesco Rodríguez Add support for CollectionAssociation#delete by Fixnum or String
I found the next issue between CollectionAssociation `delete`
and `destroy`.

    class Person < ActiveRecord::Base
      has_many :pets
    end

    person.pets.destroy(1)
    # => OK, returns the destroyed object

    person.pets.destroy("2")
    # => OK, returns the destroyed object

    person.pets.delete(1)
    # => ActiveRecord::AssociationTypeMismatch

    person.pets.delete("2")
    # => ActiveRecord::AssociationTypeMismatch

Adding support for deleting with a fixnum or string like
`destroy` method.
39f0698
Carlos Antonio da Silva Parse float value only once in number helpers
Refactor number helpers output with safety handling to call float
parsing only once. Also remove 'erb' require.
ef3e696
Carlos Antonio da Silva Merge pull request #6511 from frodsan/add_fixnum_string_support_for_d…
…elete

Add support for CollectionAssociation#delete by Fixnum or String
6f1d9d0
chrisfinne Allow blocks for count with ActiveRecord::Relation. Document and test…
… that sum allows blocks
9cc2bf6
Carlos Antonio da Silva Yield only one argument instead of splatting.
Add Changelog entry. Closes #4003
f9cb645
Carlos Antonio da Silva Review requires from number helper
Some of these requires are now only necessary in
ActiveSupport::NumberHelper. Add hash/keys require due to symbolize_keys
usage in number helpers. Also remove some whitespaces.

Closes #6414
400c5fe
Francesco Rodríguez Add tests to delete by fixnum or string id with has many through asso…
…ciations
b89553c
Carlos Antonio da Silva Merge pull request #6527 from frodsan/add_test_to_delete_by_fixnum_or…
…_string

Add tests to delete by fixnum or string id with has many through associations
3d4ede2
Andrew Mutz decoupling activesupport performance testing from actionview and addi…
…ng tests
598f8bd
Carlos Antonio da Silva Merge pull request #6526 from appfolio/decoupling_activesupport_from_…
…actionivew

Decoupling ActiveSupport from ActionView
d4a7dee
May 29, 2012
Carlos Antonio da Silva Fix failing build related to change in CollectionAssociation#delete
Merge commit 6f1d9d0
18af5da
Carlos Antonio da Silva Add note about CollectionAssociation#delete change to upgrading guide…
… [ci skip]
8795ac5
Francesco Rodríguez update Gemfile template to 1.9 hash syntax 5db367a
José Valim Merge pull request #6528 from frodsan/update_hash_syntax_gemfile_temp…
…late

update Gemfile template to 1.9 hash syntax
2d898cd
James Mead Avoid dependency on MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS. 7d8e5fa
José Valim Merge pull request #6525 from freerange/minitest-passthrough-exceptions
Exceptions like Interrupt & NoMemoryError should not be rescued in tests.
6ba93ac
Piotr Sarnacki `cat Gemfile.lock` after installing gems on travis
It may be useful to view Gemfile.lock. If the build fails we can inspect
it locally with exactly the same environment.
73cf866