Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Commits on Jan 13, 2014
@senny senny setup Bundler in engines `bin/rails` stub.
This is necessary when bundling gems locally using `BUNDLE_PATH`.
Without this patch `bin/rails` fails with:

```
/Users/senny/.rbenv/versions/2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rails/all (LoadError)
	from /Users/senny/.rbenv/versions/2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from bin/rails:7:in `<main>'
```
755fd79
Commits on Jan 17, 2014
@annaswims annaswims set encoding to binmode for pipe 0e9144d
Commits on Jan 19, 2014
@robertomiranda robertomiranda Update Changelog, Spring is under rails/spring [ci skip] 7671590
@robin850 robin850 Merge pull request #13762 from robertomiranda/spring-under-rails
Update Changelog, Spring is under rails/spring [ci skip]
935d235
@rafaelfranca rafaelfranca Merge pull request #13745 from nextgearcapital/master
set encoding for pipe to binary mode
b1b21f9
Commits on Jan 20, 2014
@zzak zzak Add link to upgrade guide for full list of deprecated finders [ci skip] 9040e04
@robertomiranda robertomiranda Update Error Message when secrets.secret_key_base isn't given 90228a1
@guilleiguaran guilleiguaran Merge pull request #13765 from robertomiranda/secrets_token
Update Error Message when secrets.secret_key_base isn't given
18e9188
@rajeshthummalapally rajeshthummalapally Correcting link that is pointing to Rails blog [ci skip] 610a3e8
@chancancode chancancode Merge pull request #13768 from rajeshthummalapally/rails_blog_correct…
…_patch_link

Fix for incorrect link that is pointing to Rails blog [ci skip]
27f1fd0
@arelenglish arelenglish Fix a typo that says you application [ci skip] 7f25524
@chancancode chancancode Merge pull request #13769 from arelenglish/fix_typo_upgrad_guide
Fix a typo that says you application [ci skip]
54befc6
@chancancode chancancode Merge pull request #13767 from zzak/doc_4_1_release_notes_deprecated_…
…finders

Add link to upgrade guide for full list of deprecated finders [ci skip]
06849fd
@carlosantoniodasilva carlosantoniodasilva Fix secrets.yml path in exception message
The file is config/secrets.yml, not config/initializers/secrets.yml.
f63c6e5
@senny senny let's link to the gem README not to the upgrading guide. [ci skip]
The PR #13767 added link to the upgrading guide to explain
details about activerecord_deprecated-finders. However the link target
features a stack of changes not releated at all. Also the relevant details
are not very informative.

I think we better link to the README so people can see what the gem is about
and how to use it.

/cc @chancancode @zzak
079ffc9
@senny senny docs, hyperlink the `Mail gem` in Action Mailer guide. [ci skip] dfac4ce
@senny senny docs should say `email` not `Email`. [ci skip] 080fc9c
@amrnt amrnt Automatically convert dashes to underscores for url helpers 746abbc
@mellowi mellowi Automatically convert dashes to underscores in shorthand routes f9f32e0
@pixeltrix pixeltrix Tidy up tests and CHANGELOG for #12598 bf19131
@anilmaurya anilmaurya moving controller_name assignment before model name condition 41722dd
@rafaelfranca rafaelfranca Merge branch 'anilmaurya-master' 5a09f13
@terracatta terracatta Ensure #second acts like #first AR finder
This commit bring the famous ordinal Array instance methods defined
in ActiveSupport into ActiveRecord as fully-fledged finders.

These finders ensure a default ascending order of the table's primary
key, and utilize the OFFSET SQL verb to locate the user's desired
record. If an offset is defined in the query, calling #second adds
to the offset to get the actual desired record.

Fixes #13743.
cafe31a
@rafaelfranca rafaelfranca Merge pull request #13757 from terracatta/master
Ensure #second (and others) acts like #first AR finder
bc62508
@rafaelfranca rafaelfranca Remove unneded argument
This variable is internal and should not be exposed to end users
de3bf3e
Commits on Jan 21, 2014
@rafaelfranca rafaelfranca When applying changes or reseting changes create the right class
Before this patch after the changes are applied the changes can be only
accessed using string keys, but before symbols are also accepted.

After this change every state of the model will be consistent.
06a0003
@rafaelfranca rafaelfranca Forgot to push this change in the parent commit b8302bc
@carlosantoniodasilva carlosantoniodasilva Remove missed usage of @first variable
With the introduction of `#second` method and friends, we added an
offsets hash which replaced the @first variable, so removing it from the
reset method to avoid creating an unused variable now.

Introduced in bc62508.
9322e07
@divineforest divineforest Fail early with "Primary key not included in the custom select clause…
…" in find_in_batches

Before this patch find_in_batches raises this error only on second iteration. So you will know about the problem only when you get the batch size threshold.
691709d
@senny senny Merge pull request #9969 from divineforest/fix-find-in-batches
Fail early with "Primary key not included in the custom select clause" i...
6a8a7f8
@senny senny Active Record changelog wording and formatting. [ci skip] 6f0aa1d
@senny senny Merge pull request #13696 from senny/engine_bin_rails_load_bundler
setup Bundler in engines `bin/rails` stub.
c60e062
@rafaelfranca rafaelfranca Extract all attribute changed work to its own method
This will make easier to hook on this feature to customize the behavior
a4cc88d
@rafaelfranca rafaelfranca Make enum feature work with dirty methods
To make this possible we have to override the save_changed_attribute
hook.
a57a2bc
@rafaelfranca rafaelfranca Add more tests for the dirty feature for enums a0520fc
@senny senny prepend table name for `Relation#select` columns.
This fixes a bug where `select(:id)` combined with `joins()` raised:

```
ActiveRecord::StatementInvalid: SQLite3::SQLException: ambiguous column name: id:
SELECT  id, authors.author_address_id
FROM "posts"
INNER JOIN "authors"
ON "authors"."id" = "posts"."author_id"
ORDER BY posts.id LIMIT 3
```

The `select_values` are still String and Symbols because other parts (mainly calculations.rb)
rely on that fact.

/cc @tenderlove
e011258
@rafaelfranca rafaelfranca `has_one` and `belongs_to` accessors don't add ORDER BY to the querie…
…s anymore.

Since Rails 4.0, we add an ORDER BY in the `first` method to ensure consistent
results among different database engines. But for singular associations this
behavior is not needed since we will have one record to return. As this
ORDER BY option can lead some performance issues we are removing it for singular
associations accessors.

Fixes #12623.
b0a8ef1
@kuldeepaggarwal kuldeepaggarwal add missing information for `id` field when used with `select` [ci skip] 7e25da9
@rafaelfranca rafaelfranca Merge pull request #13784 from kuldeepaggarwal/fix-doc-collection-proxy
Add missing information for `id` field when used with `select` [ci skip]
c6ecfc1
@rafaelfranca rafaelfranca Store the enum values in the DEFINED_ENUM constant
This will make simpler to compare if the values changed in the
save_changed_attribute method.
5620e62
@rafaelfranca rafaelfranca Use string as keys 55f6c8c
@rafaelfranca rafaelfranca Merge pull request #13776 from rails/dirty-enum
Implement the Dirty API with the Enum feature correctly.

Conflicts:
	activerecord/CHANGELOG.md
9383de4
Commits on Jan 22, 2014
@terracatta terracatta Ensure AR #second, #third, etc. finders work through associations
This commit fixes two regressions introduced in cafe31a where
newly created finder methods #second, #third, #forth, and #fifth
caused a NoMethodError error on reload associations and where we
were pulling the wrong element out of cached associations.

Examples:

  some_book.authors.reload.second

  # Before
  # => NoMethodError: undefined method 'first' for nil:NilClass

  # After
  # => #<Author id: 2, name: "Sally Second", ...>

  some_book.first.authors.first
  some_book.first.authors.second

  # Before
  # => #<Author id: 1, name: "Freddy First", ...>
  # => #<Author id: 1, name: "Freddy First", ...>

  # After
  # => #<Author id: 1, name: "Freddy First", ...>
  # => #<Author id: 2, name: "Sally Second", ...>

Fixes #13783.
03855e7
@rafaelfranca rafaelfranca Fix typo fc913d4
@rafaelfranca rafaelfranca Merge pull request #13786 from terracatta/master
Ensure AR #second, #third, etc. finders work through associations
a4ce065
@kschlarman kschlarman Calling reset on a collection association should unload the assocation
Need to define #reset on CollectionProxy.
43675f0
@semenyukdmitriy semenyukdmitriy [ci skip] Added missing `file` delivery method 9e63ead
@senny senny Merge pull request #13728 from semenyukdmitriy/master
Added missing `file` delivery method to the Configuration Guide
75cd7bc
@kei-s kei-s Remove duplicate merge ce91efe
@kbrock kbrock put core at the beginning so other classes can modify the behavior 7240300
@bobbus bobbus Add failing test for ActiveModel::Errors#has_key? method
From the doc, this method should return false and not nil if there is no errors for this key
1c2c552
@rafaelfranca rafaelfranca Merge pull request #13790 from kschlarman/collection_association_rese…
…t_fix

Calling reset on a collection association should unload the assocation
66aa5e2
@rafaelfranca rafaelfranca Make CollectionProxy#reset return self 2a29c7d
@rafaelfranca rafaelfranca Improve the CHANGELOG entry [ci skip] 8f17a83
@carlosantoniodasilva carlosantoniodasilva Merge pull request #13791 from kei-s/remove_duplicate_merge
Remove duplicate merge
0d24946
@kbrock kbrock Move changed_attributes into dirty.rb
Move serialization dirty into serialization.rb
8cbd500
@bobbus bobbus Fix ActiveModel::Errors#has_key? return value b97035d
@bobbus bobbus Update ActiveModel::Errors.has_key? test db95c7d
@jeremy jeremy Merge pull request #13799 from kbrock/better_dirty
Better ActiveRecord hierarchy for Dirty and others
6ef0569
Commits on Jan 23, 2014
@chancancode chancancode Merge pull request #13795 from bobbus/errors-has-key
Fix ActiveModel::Errors#has_key? returning nil
a7680ab