Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: rails/rails
...
head fork: rails/rails
This comparison is big! We're only showing the most recent 250 commits
Commits on Nov 29, 2012
Steve Klabnik steveklabnik Getting Started: Rails 3.2 -> Rails 4.
This is based on Rails 4, not Rails 3.2.
213f034
Carlos Antonio da Silva carlosantoniodasilva User assert_kind_of, invert assert_equal expectations 7ad590d
Steve Klabnik steveklabnik Getting Started: mac -> Mac OS X
It's properly called "Mac OS X"
8bc945d
Steve Klabnik steveklabnik Getting Started: remove reference to attr_accessible e8b2625
Steve Klabnik steveklabnik Getting Started: Improve instructions on opening a terminal 28e8abf
Steve Klabnik steveklabnik Migrations: move massive paragraph out of intro.
Most of the guides have a few simple sentences describing what they will show
you at the top. This one had a few big paragraphs. I've moved those paragraphs
down to an introductory one, and written a new smaller one for the introduction.
This makes this guide more consistent with the others.
0c294e0
Steve Klabnik steveklabnik ActiveRecord -> Active Record
The proper name, as per the documentation guides, is 'Active Record.' I've
updated several references to it as 'ActiveRecord'.
2713838
Steve Klabnik steveklabnik ActionPack -> Action Pack.
The proper name has a space.
4d1053f
Steve Klabnik steveklabnik ActionMailer -> Action Mailer.
The proper name for the library has a space.
0dfe2c2
Steve Klabnik steveklabnik ActiveSupport -> Active Support
The proper name has a space.
4e538bc
Steve Klabnik steveklabnik ActionController -> Action Controller
The proper name has a space.
4380639
Steve Klabnik steveklabnik ActionView -> Action View
The proper name has a space.
c0f415d
Steve Klabnik steveklabnik Migrations: Fix opening bullets.
The wording of these was a bit off, so I fixed them.
5cdb23c
Steve Klabnik steveklabnik Add periods to the bullet points in guides.
Talked with @fxn about this. Bullet points should have periods at the ends.
6dcae8a
Steve Klabnik steveklabnik Remove 'This guide is based on ' warnings.
It's obvious that the guide is based on this version of Rails, and may not be backwards compatible.
5ea8a41
Steve Klabnik steveklabnik Associations: s/A Guide//
It's obvious that this is a guide, and none of the other guides say 'A Guide to'.
87b5d53
Steve Klabnik steveklabnik Fix title of 'form helpers' guide.
They're Rails Guides, so obviously we're talking about Rails Form Helpers.

Also, 'helpers' should be capitalized.
e6b8452
Steve Klabnik steveklabnik Migrations: add 'Active Record' to title
Other guides that talk about Active Record specific features include the
name of the library in the title, this one should too for consistency.
9715d0a
Steve Klabnik steveklabnik Command Line: remove 'A Guide to'
It's obvious that this is a guide.
362f28d
Steve Klabnik steveklabnik Asset Pipeline: add 'the'
Some guides work without 'the'. For instance, 'Migrations' or
'Form Helpers.' But when we talk about the asset pipeline, we...
always say 'the asset pipeline.' The guide title should reflect this.
97b95c3
Jeremy Kemper jeremy Move instantiation responsibilities from Inheritance to Persistence. …
…Have Inheritance#discriminate_class_for_record handle STI lookup duties.
f2902eb
Akira Matsuda amatsuda Relation.where with no args can be chained with not, like, and not_like
examples:

  Model.where.not field: nil
  #=> "SELECT * FROM models WHERE field IS NOT NULL

  Model.where.like name: 'Jeremy%'
  #=> "SELECT * FROM models WHERE name LIKE 'Jeremy%'

this feature was originally suggested by Jeremy Kemper #5950 (comment)

Closes #5950
de75af7
Amparo Luna amparo-luna Gemfile source url for plugins updated 8fc0c98
Rafael Mendonça França rafaelfranca Merge pull request #8372 from amparo-luna/gemfile_source_url
Gemfile source url for plugins updated
f87202f
Francesco Rodríguez frodsan add documentation to CollectionProxy#empty? 61a7a9f
Francesco Rodríguez frodsan add documentation to CollectionProxy #length and #size methods [ci skip] abdfffa
Francesco Rodríguez frodsan nodoc AS::Deprecation::InstanceDelegator class [ci skip] d168d23
Steve Klabnik steveklabnik Normalize on 'After reading this guide, you will know:'
We have three or four different introduction sentences to the guides.
After this commit, we use the same one everywhere.
d16a1b9
Steve Klabnik steveklabnik Split Validations and Callbacks into separate guides.
Two big features that are only barely related in the same guide. Seems
bad.

I did not check references to these guides yet, so some links may need
to be updated.
b659e00
Rafael Mendonça França rafaelfranca Merge pull request #8378 from steveklabnik/split_validations_callback…
…s_guide

Split Validations and Callbacks into separate guides.
0a6afef
Commits on Nov 30, 2012
Andrey Deryabin aderyabin Revert "Fix annoy warning, when executing testcase."
This reverts commit a3024f8.

REASON: Since warning doesn't exist
da67d19
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8381 from aderyabin/unnecessary_monkey_patch
Remove outdated monkey patch in mysql tests
e70bab2
Jon Leighton jonleighton Mark Relation mutators as :nodoc:
These are for internal use only and cannot be relied on as part of the
public API. See discussion on 8c2c605.
c5bdf6c
Jon Leighton jonleighton Fix memory leak in development mode
Keying these hashes by klass causes reloadable classes to never get
freed. Thanks to @thedarkone for pointing this out in
the comments on 221571b.

This doesn't seem to make a massive difference to performance.

Benchmark
---------

require 'active_record'
require 'benchmark/ips'

class Post < ActiveRecord::Base
  establish_connection adapter: 'sqlite3', database: ':memory:'
end

GC.disable

Benchmark.ips(20) do |r|
  r.report { Post.connection }
end

Before
------

Calculating -------------------------------------
                          5632 i/100ms
-------------------------------------------------
                       218671.0 (±1.9%) i/s -    4364800 in  19.969401s

After
-----

Calculating -------------------------------------
                          8743 i/100ms
-------------------------------------------------
                       206525.9 (±17.8%) i/s -    4039266 in  19.992590s
68e4442
Carlos Antonio da Silva carlosantoniodasilva Simplify keys order test for as_json in Active Model c2be9b0
Jon Leighton jonleighton Use separate Relation subclasses for each AR class
At present, ActiveRecord::Delegation compiles delegation methods on a
global basis. The compiled methods apply to all subsequent Relation
instances. This creates several problems:

1) After Post.all.recent has been called, User.all.respond_to?(:recent)
   will be true, even if User.all.recent will actually raise an error due
   to no User.recent method existing. (See #8080.)

2) Depending on the AR class, the delegation should do different things.
   For example, if a Post.zip method exists, then Post.all.zip should call
   it. But this will then result in User.zip being called by a subsequent
   User.all.zip, even if User.zip does not exist, when in fact
   User.all.zip should call User.all.to_a.zip. (There are various
   variants of this problem.)

We are creating these compiled delegations in order to avoid method
missing and to avoid repeating logic on each invocation.

One way of handling these issues is to add additional checks in various
places to ensure we're doing the "right thing". However, this makes the
compiled methods signficantly slower. In which case, there's almost no
point in avoiding method_missing at all. (See #8127 for a proposed
solution which takes this approach.)

This is an alternative approach which involves creating a subclass of
ActiveRecord::Relation for each AR class represented. So, with this
patch, Post.all.class != User.all.class. This means that the delegations
are compiled for and only apply to a single AR class. A compiled method
for Post.all will not be invoked from User.all.

This solves the above issues without incurring significant performance
penalties. It's designed to be relatively seamless, however the downside
is a bit of complexity and potentially confusion for a user who thinks
that Post.all and User.all should be instances of the same class.

Benchmark
---------

require 'active_record'
require 'benchmark/ips'

class Post < ActiveRecord::Base
  establish_connection adapter: 'sqlite3', database: ':memory:'
  connection.create_table :posts

  def self.omg
    :omg
  end
end

relation = Post.all

Benchmark.ips do |r|
  r.report('delegation')   { relation.omg }
  r.report('constructing') { Post.all }
end

Before
------

Calculating -------------------------------------
          delegation      4392 i/100ms
        constructing      4780 i/100ms
-------------------------------------------------
          delegation   144235.9 (±27.7%) i/s -     663192 in   5.038075s
        constructing   182015.5 (±21.2%) i/s -     850840 in   5.005364s

After
-----

Calculating -------------------------------------
          delegation      6677 i/100ms
        constructing      6260 i/100ms
-------------------------------------------------
          delegation   166828.2 (±34.2%) i/s -     754501 in   5.001430s
        constructing   116575.5 (±18.6%) i/s -     563400 in   5.036690s

Comments
--------

Bear in mind that the standard deviations in the above are huge, so we
can't compare the numbers too directly. However, we can conclude that
Relation construction has become a little slower (as we'd expect), but
not by a huge huge amount, and we can still construct a large number of
Relations quite quickly.
64c53d7
Francesco Rodríguez frodsan hash filters should be accessed with symbols or strings 8348225
Rafael Mendonça França rafaelfranca Merge pull request #8385 from frodsan/strings_love
hash filters should be accessed with symbols or strings
76c432f
Claudio B. claudiob Remove references to AR::Observer from docs
ActiveRecord::Observer was extracted into a separate gem so it
should not be referenced anymore (see ccecab3)
20c03e7
Santiago Pastorino spastorino Merge pull request #8387 from claudiob/remove_ar_observer_from_docs
Remove references to AR::Observer from docs
0a1c611
Commits on Dec 01, 2012
Andrew White pixeltrix Make `Time.zone.parse` to work with JavaScript date strings
Chrome, Safari and Firefox serialize Date objects to strings such
as 'Mon May 28 2012 00:00:00 GMT-0700 (PDT)'. When these strings
are parsed the zone is interpreted as 'GMT-0700' which doesn't
exist in the TzInfo list of timezones.

By taking advantage of the improved date/time handling in 1.9.3
we can use `Date._parse` and the `:offset` value which is parsed
correctly.

Three tests were amended to make them pass:

1.  test_parse_with_old_date

    This needed changing to a different value because the original
    value was before EST was adopted so was being changed to a
    LMT (Local Mean Time) value after the change. It didn't before
    because `DateTime` just has offsets from UTC not timezones.

2.  test_parse_should_not_black_out_system_timezone_dst_jump

    Changed the implementation of this test as the stubs were
    dependent on internal implementation details of the test.
    Confirmed that the modified test still failed when the
    implementation of `parse` was restored to pre-#5571.

3.  test_parse_should_black_out_app_timezone_dst_jump

    Ditto.

Closes #5770.
005d910
Uriel Katz urielka Patched Marshal#load to work with constant autoloading (active_suppor…
…t/dependecies.rb) (issue #8167)
9ee0ffb
Xavier Noria fxn Merge pull request #8246 from urielka/uriel-fixed-8167
Fix #8167 - adding autoloading support for caching
60edece
Xavier Noria fxn copy-edits the docs of 9ee0ffb 0dc1417
Carlos Antonio da Silva carlosantoniodasilva Fix typo in AS guide [ci skip] fb42520
Florent Guilleux Fix Calculations#pluck doc to mention several attributes can be selec…
…ted [ci skip]
daab9bb
Vijay Dev vijaydev copy edits [ci skip] 9685019
Vijay Dev vijaydev Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	guides/source/active_record_validations.md
0181c2d
Gustavo Leon hpneo Update documentation for javascript_include_tag [ci skip] 2a6cfce
Carlos Duclos carlos21 remove unneeded Examples tag [ci skip] a1ffc4a
Alvaro Pereyra Rabanal alvaropereyra Improves documentation on favicon_link_tag e1c0aa4
Alvaro Pereyra Rabanal alvaropereyra Removes :nodoc: label [ci skip] e166f02
Carlos Duclos carlos21 nodoc AS::Testing::Pending because is deprecated [ci skip] abefe32
Gustavo Leon hpneo Remove :nodoc from SanitizeHelper module [ci skip] c71c8a9
Carlos Duclos carlos21 nodoc AD & AV railties classes ed45782
Alvaro Pereyra Rabanal alvaropereyra Removes unneeded 'Example' tags and whitespaces [ci skip] 33f6209
Alvaro Pereyra Rabanal alvaropereyra Removes :nodoc: tag on AtomFeedHelper [ci skip] 20b40c8
Alvaro Pereyra Rabanal alvaropereyra Improves documentation of Capture helper [ci skip] cd026d7
Florent Guilleux Add documentation to TransactionIsolationError [ci skip] 5ff5970
Florent Guilleux Remove trailing whitespaces 90c887f
Florent Guilleux Revert "Remove trailing whitespaces"
This reverts commit 90c887f.
8dc4041
Steve Klabnik steveklabnik Here's a few updates to the validations guide. A bunch of small changes,
plus:

* 80 column formats
* replacing the explanation of the dynamic_form gem with the example
  HTML/CSS that Rails scaffolds generate.
55a2820
Vijay Dev vijaydev Merge pull request #8379 from steveklabnik/validations_guide
Validations guide
90e2d96
Steve Klabnik steveklabnik Migration Guide: General fix-up
This introduces a bunch of editing/re-writing to the migrations guide.
There were a bunch of small changes, and a few larger ones:

* mysql does support transactions.
* Add a section about db/seeds.rb
* Largely re-wrote the first few sections
4a93836
Renato Mascarenhas rmascarenhas Reset attributes should not report changes.
When resetting an attribute, you expect it to return to the state it was
before any changes. Namely, this fixes this unexpected behavior:

~~~ruby
model.name = "Bob"
model.reset_name!
model.name_changed? #=> true
~~~
cf7ab60
Rafael Mendonça França rafaelfranca Merge pull request #8391 from rmascarenhas/reset-attribute-doesnt-cha…
…nge-it

Reset attributes should not report changes.
42efdbf
Carlos Antonio da Silva carlosantoniodasilva Remove not used variable warnigns 4eca912
Aditya Sanghi asanghi Add Mailer Callback section to Mailer guides 193c31c
Vijay Dev vijaydev Merge pull request #8382 from asanghi/mailerguide
Add Mailer Callback section to Mailer guides
583cc11
Alvaro Pereyra Rabanal alvaropereyra Cleans documentation from Helpers [ci skip] 5ab0c5d
Alvaro Pereyra Rabanal alvaropereyra Fixes wrong typo on FormHelper [ci skip] 20e61a6
Carlos Duclos carlos21 update AR::Schema docs [ci skip] 9bc16d0
Florent Guilleux Add documentation to AssetTagHelper#image_alt [ci skip] fb39249
Gustavo Leon hpneo Add documentation for Hash.from_xml [ci skip] 96f7ec4
Carlos Duclos carlos21 nodoc AS::Testing::ConstantLookup::ClassMethods [ci skip] 82ebe18
Alvaro Pereyra Rabanal alvaropereyra Cleans and removes useless 'Examples' tag [ci skip] 4940d6d
Antonio Cangiano acangiano Add db to the list of default annotation folders 553b563
Alvaro Pereyra Rabanal alvaropereyra Cleans and removes 'Examples' tag [ci skip] b1e2d7b
Francesco Rodríguez frodsan ensure original encoding doesnt change 86dd2f3
Bjørn Mæland bmaland Use attr_accessor for Rails.{application,cache,logger} b9d1d2c
Andrew White pixeltrix Only take the date parts from Time.zone.now
When there are missing components in the Hash returned by
Date._parse only the date components should default to the
value of Time.zone.now, the time components should all
default to zero.
c89b6c4
Daniel Choi danchoi Add periodical-style TOC and navigation to Kindle version of guides e8fe1d1
Matthew M. Boedicker mmb Quote ~ in git config global excludes command.
This will put ~/ in .gitconfig so it will not be hardcoded to the home
directory where the command was run.
368e4f0
Rafael Mendonça França rafaelfranca Merge pull request #8397 from mmb/gitignore_global_home
Quote ~ in git config global excludes command.
a777692
Commits on Dec 02, 2012
Renato Mascarenhas rmascarenhas Call `full_messages` instead of `to_a` in its spec. 703b638
Renato Mascarenhas rmascarenhas Actually test that ActiveModel::Errors#add defaults to :invalid. cc62ec1
Pablo Torres ptn Remove nodoc from FlashHash #[]= [ci skip] a39ab3a
Josh Susser joshsusser Add metadata to schema_migrations
migrated_at: timestamp when migration run
fingerprint: md5 hash of migration source
name: filename without version or extension
0a5afa2
Rafael Mendonça França rafaelfranca Merge pull request #8398 from rmascarenhas/active-model-errors-spec-f…
…ixes

ActiveModel::Errors spec fixes
df1484c
Rafael Mendonça França rafaelfranca Merge pull request #8394 from acangiano/add_db_folder_to_annotations
Add db to the list of default annotation folders
7730655
Yves Senn senny More descriptive error when rendering a partial with `:layout => true` 60b525c
Rafael Mendonça França rafaelfranca Merge pull request #8402 from senny/8376_descriptive_error_message_fo…
…r_partial_layout_true

More descriptive error when rendering a partial with `:layout => true`
ea53526
Pablo Torres ptn Add shallow nesting to the routing guide 2610797
Pablo Torres ptn List instructions in the order to be executed 1ba6cdd
Pablo Torres ptn Capitalize all table column titles in routing guide e309e74
Chris Walquist walquis match text with translation file example c41576e
Pablo Torres ptn Use correct conjunction and connector words [ci skip] d21a468
Pablo Torres ptn Move note to a meaningful section in the guides [ci skip] 624069d
Pablo Torres ptn Clarify section titles [ci skip] 12c7f80
Pablo Torres ptn Show equivalent routes definition without using concerns [ci skip] 34f8cd2
Pablo Torres ptn Normalize use of colon before code examples in routing guide [ci skip] 082f4f9
Pablo Torres ptn Convert a section to a tip to highlight it [ci skip] 7d6cb75
Pablo Torres ptn Correct grammar [ci skip] c5539cd
Pablo Torres ptn Add clarity to static segments docs in non-resourceful routes [ci skip] 51b2629
Pablo Torres ptn Convert parragraph about security to a NOTE [ci skip] 25e7515
Pablo Torres ptn Add counterexample for regex [ci skip] 1d36963
Pablo Torres ptn Standardize use of "route globbing" and "wildcard segments" [ci skip] 286e56f
Commits on Dec 03, 2012
Yoni Yalovitsky removed an extra slash before the 'app' dir ef4e835
Yoni Yalovitsky added full file path in all file references
It's really comfy being able to copy-paste the file paths.

I suppose there's also some benefit in trying to figure out the file name as a small exercise, but I don't think that sort of thing belongs in "Getting Started".
57c60d3
Matthew Robertson matthewrobertson increment_counter and decrement_counter can accept and array of ids a…
…s an arg
43405a7
Matthew Robertson matthewrobertson grammar improvements for increment_counter and decrement_counter docs 0a17800
Hendy Tanata htanata Fix typo. b066210
Josh Susser joshsusser Add migration history to schema.rb dump f02d218
Xavier Noria fxn Merge pull request #8375 from steveklabnik/migrations_guide
Updates to the Migration Guide
c9c1e6b
Carlos Antonio da Silva carlosantoniodasilva Fix failing tests related to rake notes
Related to changes introduced in 553b563
137f3be
Rafael Mendonça França rafaelfranca Try to get back the campfire notifications 4fac8c6
indi 1334 fix some formatting 47d95c8
Toshinori Kajihara kennyj Fix wrong doc and message about rails profiler. 0f47c49
Rafael Mendonça França rafaelfranca Merge pull request #8407 from kennyj/fix_profiler_comments
Fix wrong doc and message about rails profiler.
d7fdcc8
Jeremy Kemper jeremy Override <%== to always behave as literal text rather than toggling b…
…ased on whether escaping is enabled. Fixes that existing plaintext email templates using <%== unexpectedly flipped to *escaping* HTML when #8235 was merged.
2797757
Jean Boussier byroot Fix a typo in ActionController::Caching 511f301
Carlos Antonio da Silva carlosantoniodasilva Use send in Time marshal extensions since the methods are now private
See ruby/ruby@9c1b316

All Active Support tests pass in 2.0.0preview2 after this change.
Closes #8409
baa4d79
Commits on Dec 04, 2012
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8393 from frodsan/fix_dependend_order_test_example
Ensure original encoding does not change in mb_chars test.
e1ce84b
Yasuharu Ozaki yasuoza Locate `=require turbolinks` at the bottom of application.js
Turbolinks should be located at the bottom of application.js
to detect assets change properly.
13ba4fe
Rafael Mendonça França rafaelfranca Merge pull request #8411 from YasuOza/turbolinks_require_bottom
Locate `=require turbolinks` at the bottom of application.js
5004363
Jeremy Kemper jeremy Bump mailer to quiet the stdout log messages c7e4ee7
Josh Susser joshsusser style cleanup 94ef7b5
Yves Senn senny Do not instantiate intermediate AR objects when eager loading.
Closes #3313
db51704
Rafael Mendonça França rafaelfranca Merge pull request #8403 from senny/3313_after_find_is_triggered_too_…
…often

Do not instantiate intermediate AR objects when eager loading.
a9dc446
momochanfitz momochanfitz Fixed issue where routes with globs caused constraints on that glob to
be ignored. A regular expression constraint gets overwritten when the
routes.rb file is processed. Changed the overwriting to an ||= instead
of an = assignment.
4243de6
David Heinemeier Hansson dhh Track the default application.css/js files for turbolinks as per vers…
…ion 0.6.0
2259893
Toshinori Kajihara kennyj pg_namespace table isn't used. d3f4625
Vijay Dev vijaydev Revert "Add documentation to TransactionIsolationError [ci skip]"
This reverts commit 5ff5970.

Reason: Seems dubious and adds less value.

[ci skip]
b5de0ac
Rafael Mendonça França rafaelfranca Merge pull request #8416 from kennyj/redundant_pg_namespace
pg_namespace table isn't used.
042f5eb
Vijay Dev vijaydev copy edits [ci skip] 2b847a0
Vijay Dev vijaydev Updated 4.0 release notes
The release notes is changed to include only the major changes and point
to the changelogs for the complete list. This lets us talk more about the
features included in the upcoming release and make the guide more useful
and interesting than just a list of all changelogs.

This is still a WIP guide pending a lot of work.

[ci skip]
9d3ce6c
Vijay Dev vijaydev Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	guides/source/migrations.md
40e1612
Toshinori Kajihara kennyj Fix #8414. Performance problem with postgresql adapter primary_key fu…
…nction.
634d28e
Rafael Mendonça França rafaelfranca Merge pull request #8417 from kennyj/fix_8414
Fix #8414. Performance problem with postgresql adapter primary_key function.
2715c4a
Ershad K ershad Fixing a couple of spelling mistakes 6389571
簡煒航 (Jian Weihang) tonytonyjan add a notice about loading assets in production mode 52e1a42
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8418 from ershad/master
Fixing a spelling mistake [ci skip]
6300d83
簡煒航 (Jian Weihang) tonytonyjan Merge pull request #120 from tonytonyjan/patch
add a notice about loading assets in production mode
c32978d
Carlos Antonio da Silva carlosantoniodasilva Improve the Active Model guide [ci skip] 7f39560
Carlos Antonio da Silva carlosantoniodasilva Fix Active Record validation error messages markup in guides
The other way it was not marking the text as italic, it was showing the
underlines as normal text.

Also fixes some code examples indentation and # => marks in Active Model
and Active Record guides.

[ci skip]
129eac0
Commits on Dec 05, 2012
Pablo Torres ptn Correct bad English ad22352
Pablo Torres ptn Define a generator before referring to it cb389fc
Claudio B. claudiob Replace comments' non-breaking spaces with spaces
Sometimes, on Mac OS X, programmers accidentally press Option+Space
rather than just Space and don’t see the difference. The problem is
that Option+Space writes a non-breaking space (0XA0) rather than a
normal space (0x20).

This commit removes all the non-breaking spaces inadvertently
introduced in the comments of the code.
019df98
Fabrizio Regini freegenie Adding filter capability to ActionController logs 86e3aaa
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8421 from claudiob/remove_unicode_blanks
Replace comments' non-breaking spaces with spaces [ci skip]
4af9be0
Andrew White pixeltrix Merge pull request #8404 from freegenie/filter_redirects e905639
Joey Butler Extract method refactoring in ActionDispatch::Routing::SingletonResou…
…rce.
542d525
Rafael Mendonça França rafaelfranca Merge pull request #8412 from JoeyButler/action_dispatch_routing_mapp…
…er_refactoring

Extract method refactoring.
1b32c06
Fabrizio Regini freegenie Allow fragment cache to accept :if and :unless options
[Stephen Ausman + Fabrizio Regini]
6b014a4
Rafael Mendonça França rafaelfranca Merge pull request #8371 from freegenie/5396-conditional-fragment-cac…
…hing

Allow fragment cache to accept :if and :unless options.

Closes #5396
6ed4ad1
Toshinori Kajihara kennyj silence warning: possibly useless use of a constant in void context 180e2e5
Xavier Noria fxn Merge pull request #8424 from kennyj/tiny_fixes_20121206
fix warning: possibly useless use of a constant in void context
396c068
Toshinori Kajihara kennyj Add ENV['RACK_ENV'] support to rake runner/console/server. a769557
Rafael Mendonça França rafaelfranca Merge pull request #8427 from kennyj/support_rack_env
Add ENV['RACK_ENV'] support to rake runner/console/server.
ddd4fac
Carlos Antonio da Silva carlosantoniodasilva Fix duplicated method name
[ci skip]
b6f0978
Nick Reed reed Revert turbolinks load order requirement b8b9b76
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8429 from reednj77/turbolinks-js-include-order
Revert turbolinks load order requirement
2e299fc
Aaron Patterson tenderlove Merge branch 'joshsusser-master' into merge
* joshsusser-master:
  style cleanup
  Add migration history to schema.rb dump
  Add metadata to schema_migrations

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/schema.rb
0c692f4
Josh Susser joshsusser dump schema.rb without :version option cb79070
Aaron Patterson tenderlove Merge pull request #8431 from joshsusser/schemadump
dump schema.rb without :version option
036d3e1
Commits on Dec 06, 2012
Pablo Torres ptn Introduce Bundler and Gemfiles in a NOTE 83cb6fb
James Pinto thejamespinto correct bad jquery syntax 7cf2912
James Pinto thejamespinto adding example for f.file_input 4aced1f
James Pinto thejamespinto adding example for f.file_input 15f2663
James Pinto thejamespinto complementary options guidelines for f.file_field and file_field_tag d2fb5f2
James Pinto thejamespinto API reader should look elsewhere for helper instructions ba2d867
Xavier Noria fxn adds a couple of items to the check list for stable releases [ci skip] 7b03d40
Andrew White pixeltrix Add comment about implementation of class_attribute
To prevent future pull requests like #8435 add a comment about the
implementation of class_attribute using class_eval for performance.

[ci skip]
8942035
Carlos Antonio da Silva carlosantoniodasilva Refactor tests that switch RAILS_ENV and RACK_ENV
This cleanup aims to fix a build failure:
https://travis-ci.org/rails/rails/jobs/3515951/#L482

Since travis always have both ENV vars set to "test", a test is failing
where it's expected to output the default env "development", but "test"
is the result due to RACK_ENV being set when we expect it to not be.

By cleaning this duplication we ensure that changing any of these env
variables will pick the right expected value.
5a8f25f
Josh Susser joshsusser convert time to string
why is this a Time to start with?
dba022f
Andrew White pixeltrix Invert precedence of content in ActionDispatch::Static
This commit inverts the precedence in ActionDispatch::Static so that
dynamic content will be served before static content. This is so that
precompiled assets do not inadvertently get included when running in
development mode - it should have no effect in production where static
files are usually handled by the web server.

Closes #6421
c59734f
Josh Susser joshsusser Oracle needs table to check index existence d2cc10c
Rafael Mendonça França rafaelfranca Change the encrypted campfire notification token b0e7b6f
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8439 from joshsusser/fixes
Fixes issues in test_mysql2
ce8ac39
Steve Klabnik steveklabnik CHANGELOG for 78d5d6f.
It was pointed out by @giner that the CHANGELOG entry for 78d5d6f
wasn't included. Here it is.
b27f27d
Rafael Mendonça França rafaelfranca Merge pull request #8440 from steveklabnik/master
CHANGELOG for 78d5d6f

[ci skip]
4a2b739
Carlos Antonio da Silva carlosantoniodasilva Run rake tasks all at once in rake dbs test for a speed up
Before:

    Finished tests in 56.245787s, 0.2133 tests/s, 0.0000 assertions/s.
    12 tests, 0 assertions, 0 failures, 0 errors, 0 skips

After:
    Finished tests in 42.401416s, 0.2830 tests/s, 0.0000 assertions/s.
    12 tests, 0 assertions, 0 failures, 0 errors, 0 skips
43c2842
Commits on Dec 07, 2012
Drew Dara-Abrams drewda changing tense, since Rails 3.2 has been released 4bdbf0a
Carlos Antonio da Silva carlosantoniodasilva Use CURRENT_TIMESTAMP since it has apparently better cross db support
LOCALTIMESTAMP is not support by sqlite3, and travis was giving us these
errors: https://travis-ci.org/rails/rails/jobs/3535241/#L570
0029244
Carlos Antonio da Silva carlosantoniodasilva Remove method redefined warnings 04aece2
Carlos Antonio da Silva carlosantoniodasilva Improve AR changelog 1eaf3db
Carlos Antonio da Silva carlosantoniodasilva Unscope update_column(s) query to ignore default scope
When applying default_scope to a class with a where clause, using
update_column(s) could generate a query that would not properly update
the record due to the where clause from the default_scope being applied
to the update query.

    class User < ActiveRecord::Base
      default_scope where(active: true)
    end

    user = User.first
    user.active = false
    user.save!

    user.update_column(:active, true) # => false

In this situation we want to skip the default_scope clause and just
update the record based on the primary key. With this change:

    user.update_column(:active, true) # => true

Fixes #8436.
0e67f79
Carlos Antonio da Silva carlosantoniodasilva Stop shelling out more than necessary cf05e5f
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8332 from amatsuda/ar_where_chain
Relation.where with no args can be chained with not, like, and not_like

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/relation/query_methods.rb
23b9cc8
Carlos Antonio da Silva carlosantoniodasilva Ensure there won't be any regression with where(nil) calls
Consider this scenario:

    if params[:foo]
      conditions = { foo: true }
    end

    foos = Foo.where(conditions).order(:id)

When params[:foo] is nil, this would call:

    foos = Foo.where(nil).order(:id)

In this scenario, we want Foo.where(conditions) to be the same as calling
Foo.all, otherwise we'd get a "NoMethodError order for WhereChain".

Related to #8332.
6ba0f97
Carlos Antonio da Silva carlosantoniodasilva Move where with blank conditions test to the correct where tests file
This test does not belong to has many associations test.
55dec5a
Andrew White pixeltrix Revert "Invert precedence of content in ActionDispatch::Static"
This reverts commit c59734f.
af73e3c
Claudio B. claudiob Update #where rdoc to match 6ba0f97 [ci skip]
This commit updates the rdoc of AR#where to match the changes applied
in 6ba0f97 that is:

* `where(nil)` has the same effect of `where('')`: a no op
* `where` (no args) has the same effect of `where(:chain)`: to create a WhereChain
74e3f30
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8445 from claudiob/match_rdoc_with_6ba0f97
Update #where rdoc to match 6ba0f97 [ci skip]
ee5999d
Carlos Antonio da Silva carlosantoniodasilva Fix where.not with in clause
Arel::Nodes::In inherits from Arel::Nodes::Equality, so the case
statement was always using the Equality operator for both scenarios,
resulting in a not equal query instead.
89ab303
Xavier Noria fxn let @version be always externally set in guides generation [fixes #8221]
Shelling out was there for authors convenience, but we are
rather going to have the tag or SHA1 always in RAILS_VERSION
and if the environment variable is blank, then just use
"local" as a reminder that you are just working locally.

The docs server has been updated to set the long SHA1 in
RAILS_VERSION when generating edge guides.
0adcf6d
Xavier Noria fxn revises a RDoc example to make it idiomatic
The force flag suggests the original was probably copied
from some db/schema.rb. Thanks to Josh Susser for spotting
and reporting this.
27ca915
Ian C. Anderson iancanderson Added overview items to Guides Guidelines prologue 70b8094
Claudio B. claudiob Document the types of arguments accepted by AR#not
This commit stems from #8332 (comment)

Since the formats in which conditions can be passed to `not` differ
from the formats in which conditions can be passed to `like` and `not_like`,
then I think it's worth adding rdoc and tests to show this behavior
bb53c60
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8452 from claudiob/explain_where_chain_parameters
Document the types of arguments accepted by AR#not
c205284
katieoldaker katieoldaker Fixed grammar in a lot of guide prologues. 7c05ea2
David Heinemeier Hansson dhh Rename all action callbacks from *_filter to *_action 9d62e04
Max Katz mackshkatz Fix small grammatical error 38db4e2
David Heinemeier Hansson dhh Fix README 7b50dc5
Carlos Antonio da Silva carlosantoniodasilva Rollback where.like and where.not_like
The real win with these chain methods is where.not, that takes care of
different scenarios in a graceful way, for instance when the given value
is nil.

    where("author.id != ?", author_to_ignore.id)
    where.not("author.id", author_to_ignore.id)

Both where.like and where.not_like compared to the SQL versions doesn't
seem to give us that much:

    Post.where("title LIKE 'ruby on%'")
    Post.where.like(title: 'ruby on%'")
    Post.where("title NOT LIKE 'ruby on%'")
    Post.where.not_like(title: 'ruby on%'")

Thus Rails is adding where.not, but not where.like/not_like and others.
8d02afe
Francesco Rodríguez frodsan Rename ActiveSupport::BasicObject to ActiveSupport::ProxyObject
AS::BasicObject is used for proxy classes. Let's give it a less concerning
name. Also, it avoids the confusion with Ruby's Basic Object.
6ee03a4
Francesco Rodríguez frodsan fix prepend_before_filter documentation [ci skip] f53132d
David Heinemeier Hansson dhh Let the scaffold example use the "set shared record" pattern to expla…
…in callbacks
339e4e8
Francesco Rodríguez frodsan update documentation and code to use _action callbacks a53a7be
Jeremy Kemper jeremy Merge pull request #8454 from frodsan/deprecate_as_basic_object
Rename ActiveSupport::BasicObject to ActiveSupport::ProxyObject
85f4956
Xavier Noria fxn Merge pull request #8455 from frodsan/actionize
Actionize: Use `_action` callbacks in documentation and code
9cb91f9
Francesco Rodríguez frodsan use `_action` instead of `_filter` callbacks 5fb94ec
Francesco Rodríguez frodsan add tests to aliased _filter callbacks 1b97d41
Xavier Noria fxn Merge pull request #8456 from frodsan/actionize2
Actionize2
69163cc
katieoldaker katieoldaker Punctuation, capitalization, grammar fixes in rails guides fc6336d
Commits on Dec 08, 2012
Francesco Rodríguez frodsan use :only instead of :except callback option in the controller template
As [Security Guide](http://edgeguides.rubyonrails.org/security.html#whitelists-versus-blacklists)
says, it's better to use `before_filter only: []` instead of `except: []`
so we don't forget to turn the filter off for newly added actions.
a3c29b7
Claudio B. claudiob Update activesupport/lib/active_support/deprecation/proxy_wrappers.rb
Fix a typo in rdoc (*expect* for *except*)
e618adb
Francesco Rodríguez frodsan fix scaffold controller generator tests cd526fe
Francesco Rodríguez frodsan update guides to use _action callbacks [ci skip] f19e41f
Steve Klabnik steveklabnik Remove references to Rails versions.
There's no reason for guides to reference old behaviors. They should
be current as of the versions of Rails that they ship with, and including
older information just clutters thing.

I discussed this change with @fxn and he agrees.
ed78770
Steve Klabnik steveklabnik Remove reference to background queue in mailer guide.
Mailers are always async now, and we already discuss
queueing lower down in the guide.
350b122
Steve Klabnik steveklabnik Fill out Active Support Core Extensions 'you will learn' list. 1ef8138
Steve Klabnik steveklabnik Fill out API Documentation Guidelines 'you will learn' list. aa1b903
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8459 from frodsan/explicit!
use :only instead of :except callback option in the controller template
0eedfec
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8462 from frodsan/update_guides_action_callbacks
Update guides to use _action callbacks [ci skip]
236bed9
Carlos Souza caike Update AR Changelog with correct example using includes
These queries don't seem to work without the includes clause. [ci skip]
ad59260
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8457 from caike/master
Update AR Changelog with correct example using includes [ci skip]
3f95908
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8395 from bmaland/attr_accessors
Use attr_accessor for Rails.{application,cache,logger}
bef3308
Francesco Rodríguez frodsan Fix #assert_instance_method to also assert indented methods 0e027f4
Francesco Rodríguez frodsan use _action callbacks in actionmailer 4ec7493
Rafael Mendonça França rafaelfranca Merge pull request #8465 from frodsan/update_am_action_callbacks
use _action callbacks in actionmailer
40991dd
Carlos Antonio da Silva carlosantoniodasilva Merge pull request #8461 from frodsan/fix_assert_method_generators
Fix #assert_instance_method to also assert indented methods
49295e7
Carlos Antonio da Silva carlosantoniodasilva Improve where.not docs [ci skip]
* Fix example queries
* Remove doc entries of where.like/not_like.
* Remove :chain from where.not related docs. To me that's an implementation
  detail and we don't expect people to use where(:chain).not.
7d42317
Carlos Antonio da Silva carlosantoniodasilva Fix scaffold controller generator tests 1233fc6
Vijay Dev vijaydev Revert "Introduce Bundler and Gemfiles in a NOTE"
This reverts commit 83cb6fb.

Reason: very trivial

[ci skip]
4085dd6
Vijay Dev vijaydev copy edits [ci skip] 7297980
Vijay Dev vijaydev Merge branch 'master' of github.com:lifo/docrails 0a33fcd
Aaron Stone sodabrew Session variables for mysql, mysql2, and postgresql adapters can be set
in the new 'variables:' hash in each database config section in database.yml.
The key-value pairs of this hash will be sent in a 'SET key = value, ...'
query on new database connections.

The configure_connection methods from mysql and mysql2 into are
consolidated into the abstract_mysql base class.
97d06e8
Vijay Dev vijaydev update release notes [ci skip] ea86fa3
Vijay Dev vijaydev Merge pull request #8348 from danchoi/master
Kindle ebook generation with working section navigation
86269b4
Jeremy Kemper jeremy Merge pull request #8346 from sodabrew/patch-1
Add `variables:` to database.yml for mysql, mysql2, and postgresql adapters
61b528e
Carlos Antonio da Silva carlosantoniodasilva Fix method assertion ensuring it will match "end" with the same inden…
…tation

Otherwise it was matching "end" lines from blocks within the method body,
making tests such as the migration ones fail.
314e4bb
Commits on Dec 09, 2012
Jeremy Kemper jeremy Omit directories from gemspec.files for RubyGems 2 compat.
RG2 packager expects each spec.files path to be a file and bombs when it tries to tarball a dir.

May revert if rubygems/rubygems#413 is accepted.
bb8923d
George Claghorn georgeclaghorn Make code statistics rake task handle new test locations properly
As of 2a68f68:

- Unit tests are now in test/models, instead of test/units
- Functional tests are now in test/controllers, instead of
  test/functional
- Helper tests are now in test/helpers, instead of test/units/helpers
- Mailer tests are now in test/mailers, instead of test/functional

Update the rake task for code statistics (`rake stats`) so that it
recognizes files in the above locations as tests, and accurately
calculates statistics such as "Test LOC" and "Code to Test Ratio."
Safely handle Rails apps that still have tests in the old locations.
6e0eb92
Jeremy Kemper jeremy Merge pull request #8466 from gclag/stats-handle-new-test-locations
Make rake task for code statistics handle new test locations properly
e58e8bd
Vijay Dev vijaydev Revert "API reader should look elsewhere for helper instructions"
This reverts commit ba2d867.

Reason:
rails/docrails@ba2d867#commitcomment-2276670

[ci skip]
6c58fca
Katrina Owen kytrinyx Include command to create mysql user
The guide mentions that the 'rails' user is needed, but doesn't
explicitly include the command to do so.
21d87f7
Rafael Mendonça França rafaelfranca Merge pull request #8469 from kytrinyx/explicit-mysql-instructions
Include command to create mysql user

[ci skip]
2d6b406
Rafael Mendonça França rafaelfranca Remove the spaces after the open bracket and before the close bracket.
All our generated code follow this rule
6897a83
Vijay Dev vijaydev revise block on kindle guides [ci skip] 3c2c1a4