Commit Graph

41938 Commits

Author SHA1 Message Date
Robin Dupret fe63933cee Add a missing changelog entry for #13825 [ci skip] 2014-01-25 22:12:28 +01:00
Andrew White a31a44a266 Add additional tests for #13824 2014-01-25 07:38:29 +00:00
Byron Bischoff 345555cd4c Transform dashes to underscores in resource route names
Fixes #13824
2014-01-25 07:19:33 +00:00
Godfrey Chan 94ce51445e Merge pull request #13772 from chancancode/fix_has_secure_password_for_good
Refactored validations rules for has_secure_password
2014-01-24 20:35:48 -08:00
Guillermo Iguaran 7776fd6afb Merge pull request #13835 from frodsan/remove_unused_argument
Remove unused argument.
2014-01-24 20:35:00 -08:00
Godfrey Chan 98705d88cd Some minor fixes 2014-01-24 20:06:31 -08:00
Godfrey Chan b6ddbfb158 Removed old tests 2014-01-24 19:49:31 -08:00
Godfrey Chan 8ca59237dd Got all the new tests passing 2014-01-24 19:49:30 -08:00
Godfrey Chan 20490adcbf Restored the ability to clear the password with user.password= nil (see the docs) 2014-01-24 19:49:30 -08:00
Godfrey Chan 19a4ef305d Rewrote the tests for has_secure_password 2014-01-24 19:49:30 -08:00
Francesco Rodriguez e2f3e0dc50 Remove unused argument. 2014-01-24 22:25:15 -03:00
Yves Senn 220ee0c74a Merge pull request #13785 from kuldeepaggarwal/fix-find_with_multiple_ids
Fix `ActiveRecord::RecordNotFound` error message with custom primary key
2014-01-24 15:13:16 -08:00
Kuldeep Aggarwal 3a0ddf3394 Fix `ActiveRecord::RecordNotFound` error message with custom primary key 2014-01-25 02:29:23 +05:30
Rafael Mendonça França c438c61794 Merge pull request #13829 from qsymmachus/improve_validates_with_example
Reordered classes in AR Validation #validates_with example [ci skip]
2014-01-24 11:41:25 -08:00
John Olmsted & Strand McCutchen 098a960266 Reordered classes in AR Validation #validates_with example [ci skip]
Person called GoodnessValidator before it was defined.
This change will compile the example correctly.
2014-01-24 11:30:07 -08:00
Guillermo Iguaran 0a43bf3146 Add a test-case for GH #13825 2014-01-24 14:10:46 -05:00
Guillermo Iguaran f5c3531ade Merge pull request #13828 from bronzle/apploader-should-check-for-file
app_rails_loader.rb should check if bin/rails is a File before calling F...
2014-01-24 10:05:35 -08:00
Byron Bischoff cf6c00d027 app_rails_loader.rb should check if bin/rails is a File before calling File.read(exe); closes #13825 2014-01-24 10:00:31 -08:00
Yves Senn 8efd5fec75 Merge pull request #13811 from mdesantis/issue-13810
Fixes #13810 `rake routes` error when mount `Rails::Engine` with empty routes
2014-01-24 04:34:22 -08:00
Maurizio De Santis c1f8a0d614 Fix `rake routes` error when `Rails::Engine` with empty routes is mounted; fixes rails/rails#13810
Squash
2014-01-24 12:41:48 +01:00
Yves Senn e61b841a4f Merge pull request #13821 from vipulnsward/remove-assignment-in-test
Remove unused assignment to fix warnings in enum test.
2014-01-23 23:52:25 -08:00
Vipul A M 9b254df181 Remove unused assignment to fix warnings in enum test. 2014-01-24 12:14:02 +05:30
Guillermo Iguaran f1a0b15139 Merge pull request #13819 from arthurnn/one_require_test
unify param.require tests
2014-01-23 19:33:59 -08:00
Arthur Neves aae53d2175 unify param.require tests 2014-01-23 22:28:24 -05:00
Guillermo Iguaran bc0820c495 Merge pull request #13818 from arthurnn/small_test_case
test boolean and number json param parsing
2014-01-23 19:03:24 -08:00
Arthur Neves 96dd3016d1 test boolean and number json param parsing 2014-01-23 21:56:28 -05:00
Godfrey Chan a7680ab47d Merge pull request #13795 from bobbus/errors-has-key
Fix ActiveModel::Errors#has_key? returning nil
2014-01-23 08:30:04 -08:00
Jeremy Kemper 6ef0569b0b Merge pull request #13799 from kbrock/better_dirty
Better ActiveRecord hierarchy for Dirty and others
2014-01-22 13:44:11 -08:00
Adrien Coquio db95c7dceb Update ActiveModel::Errors.has_key? test 2014-01-22 21:26:53 +01:00
Adrien Coquio b97035df64 Fix ActiveModel::Errors#has_key? return value 2014-01-22 21:01:41 +01:00
Keenan Brock 8cbd500035 Move changed_attributes into dirty.rb
Move serialization dirty into serialization.rb
2014-01-22 13:47:34 -05:00
Carlos Antonio da Silva 0d24946903 Merge pull request #13791 from kei-s/remove_duplicate_merge
Remove duplicate merge
2014-01-22 08:28:45 -08:00
Rafael Mendonça França 8f17a834ae Improve the CHANGELOG entry [ci skip] 2014-01-22 13:25:12 -02:00
Rafael Mendonça França 2a29c7d3b7 Make CollectionProxy#reset return self 2014-01-22 13:24:48 -02:00
Rafael Mendonça França 66aa5e2521 Merge pull request #13790 from kschlarman/collection_association_reset_fix
Calling reset on a collection association should unload the assocation
2014-01-22 13:16:35 -02:00
Adrien Coquio 1c2c552703 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
2014-01-22 15:49:08 +01:00
Keenan Brock 7240300308 put core at the beginning so other classes can modify the behavior 2014-01-22 09:28:19 -05:00
kei ce91efed65 Remove duplicate merge 2014-01-22 22:15:19 +09:00
Yves Senn 75cd7bc3c2 Merge pull request #13728 from semenyukdmitriy/master
Added missing `file` delivery method to the Configuration Guide
2014-01-22 01:53:30 -08:00
Semenyuk Dmitriy 9e63ead4ae [ci skip] Added missing `file` delivery method 2014-01-22 15:50:01 +06:00
Kelsey Schlarman 43675f014c Calling reset on a collection association should unload the assocation
Need to define #reset on CollectionProxy.
2014-01-21 18:24:28 -08:00
Rafael Mendonça França a4ce065943 Merge pull request #13786 from terracatta/master
Ensure AR #second, #third, etc. finders work through associations
2014-01-21 16:45:08 -08:00
Rafael Mendonça França fc913d4016 Fix typo 2014-01-21 22:38:07 -02:00
Jason Meller 03855e790d Ensure AR #second, #third, etc. finders work through associations
This commit fixes two regressions introduced in cafe31a078 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.
2014-01-21 19:35:27 -05:00
Rafael Mendonça França 9383de42a2 Merge pull request #13776 from rails/dirty-enum
Implement the Dirty API with the Enum feature correctly.

Conflicts:
	activerecord/CHANGELOG.md
2014-01-21 20:37:45 -02:00
Rafael Mendonça França 55f6c8c908 Use string as keys 2014-01-21 20:35:21 -02:00
Rafael Mendonça França 5620e62f3f 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.
2014-01-21 20:32:52 -02:00
Rafael Mendonça França c6ecfc1668 Merge pull request #13784 from kuldeepaggarwal/fix-doc-collection-proxy
Add missing information for `id` field when used with `select` [ci skip]
2014-01-21 13:39:55 -08:00
Kuldeep Aggarwal 7e25da9eed add missing information for `id` field when used with `select` [ci skip] 2014-01-22 02:50:23 +05:30
Rafael Mendonça França b0a8ef140e `has_one` and `belongs_to` accessors don't add ORDER BY to the queries 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.
2014-01-21 14:41:52 -02:00