Commit Graph

40523 Commits

Author SHA1 Message Date
Rafael Mendonça França
5a011409a4 Merge pull request #12390 from kennyj/rename_to_association_methods
Renamed generated_feature_methods to generated_association_methods.

Conflicts:
	activerecord/lib/active_record/associations/builder/association.rb
	activerecord/lib/active_record/associations/builder/singular_association.rb
	activerecord/test/cases/base_test.rb
2013-11-05 13:35:26 -02:00
Rafael Mendonça França
679902b916 Remove private API test 2013-11-05 13:31:31 -02:00
Guillermo Iguaran
abe300a424 Merge pull request #12773 from ptn/use_19_syntax_in_schema_test
Use 1.9 Hash syntax consistently
2013-11-05 06:53:07 -08:00
Pablo Torres
6f788b1d91 Use 1.9 Hash syntax consistently 2013-11-05 08:13:37 -05:00
Yves Senn
7d17b1dedb Merge pull request #12752 from notalex/expand_path_refactoring
Refactor File.expand_path usage to remove additional File.join
2013-11-05 01:35:28 -08:00
Alex Johnson
01ef2c1943 Refactor File.expand_path usage to remove additional File.join 2013-11-05 10:50:03 +05:30
Aaron Patterson
026d055568 ask the fixture set for the sql statements 2013-11-04 16:39:34 -08:00
Aaron Patterson
9f8762f1d5 The enum value constant isn't used, so rm it for now. 2013-11-04 15:55:29 -08:00
Aaron Patterson
238ee10c41 stop doing the same calculation over and over 2013-11-04 15:51:09 -08:00
Aaron Patterson
9104702be6 oops, template replay needs to happen after bundle. :orz: 2013-11-04 15:13:15 -08:00
Aaron Patterson
7eb586f57f application template respects Gemfile entries 2013-11-04 15:00:29 -08:00
Aaron Patterson
8beb42cfbc gems can be added or skipped from the template 2013-11-04 15:00:29 -08:00
Yves Senn
37d4bfbfd9 fix copy & paste test-case naming. [ci skip] 2013-11-04 19:22:53 +01:00
Yves Senn
9c4261351c document BACKTRACE env var usage in testing guide. [ci skip] 2013-11-04 17:43:05 +01:00
Carlos Antonio da Silva
6d540d135f Fix failures related to enum changes
Commit 6e4a810f51b9ed2468b92247ef5568cc9d6dbcc0 changed the implementation
from class_eval to define_method, but missed the access to the constant
versus the access to the constant name.
2013-11-04 13:40:16 -02:00
Carlos Antonio da Silva
28dea539e1 Convert schema file to ruby 1.9 style hash 2013-11-04 13:32:17 -02:00
Carlos Antonio da Silva
a7f3c6944d Style fixes on test schema file 2013-11-04 13:32:17 -02:00
Carlos Antonio da Silva
f669975434 Merge pull request #12755 from cbartlett/master
Remove extra whitespace
2013-11-04 07:32:03 -08:00
Carlos Antonio da Silva
d0d7555e87 Refactor logic to grab the max time of the list of timestamp names in #cache_key
Reuse the already existing logic used for grabbing this information from
the updated columns.
2013-11-04 13:14:07 -02:00
Carlos Antonio da Silva
92c6305954 Respect cache timestamp format when giving timestamps to #cache_key 2013-11-04 13:11:51 -02:00
Colin Bartlett
87205c3ca4 Remove extra whitespace
When generating an app with --skip_active_record, an extra
line of whitespace was included unnecessarily.
2013-11-04 10:06:58 -05:00
Carlos Antonio da Silva
91d72fe652 ✂️ [ci skip] 2013-11-04 13:01:57 -02:00
David Heinemeier Hansson
6e4a810f51 Merge pull request #12754 from ck3g/replace-class-evals-with-define-method-for-enum
Replace `class_eval` with `define_method` for enum
2013-11-04 06:57:37 -08:00
Carlos Antonio da Silva
b5cd187ae4 Fix typo in railties changelog
Also improve the example to show as shell command [ci skip]
2013-11-04 12:53:19 -02:00
Carlos Antonio da Silva
caf2390aee Fix changelog indent [ci skip] 2013-11-04 12:42:47 -02:00
Vitaly Tatarintsev
8264701355 Replace class_eval with define_method for enum
db41eb8a6e (commitcomment-4502683)
2013-11-04 16:42:22 +02:00
Yves Senn
84eac5dab8 BACKTRACE environment variable to show unfiltered backtraces.
We used to support the `BACKTRACE` environment variable but when
we switched to MiniTest it got removed: f9382cd7948

This commit adds back the functionality to show the unfiltered backtrace when needed.
This also works when you run your tests with `rake`:

* `BACKTRACE=1 bin/rake test`
* `BACKTRACE=1 ruby -Itest ...`
2013-11-04 10:00:44 +01:00
Guillermo Iguaran
876fd5a5d4 Merge pull request #12750 from arunagw/webconsole-invite-only
Not adding webconsole by default in new apps
2013-11-03 13:20:28 -08:00
Arun Agrawal
fae08dd9ca No web-console for now 2013-11-03 22:19:17 +01:00
David Heinemeier Hansson
2b66f556ed Line up the comments for aesthetics 2013-11-03 12:53:48 -08:00
David Heinemeier Hansson
1c35f9331c Aesthetics 2013-11-03 12:41:58 -08:00
David Heinemeier Hansson
50b7d21ed7 Code style for privacy indention 2013-11-03 08:39:48 -08:00
David Heinemeier Hansson
00b9a446de Ensure backwards compability after the #deep_munge extraction 2013-11-03 08:38:41 -08:00
David Heinemeier Hansson
c59e902671 Add test verifying that you can only sort ARs of the same type 2013-11-02 20:05:23 -07:00
David Heinemeier Hansson
430b252d3d Revert "ActiveRecord::Base#<=> has been removed. Primary keys may not be in order," -- will be replaced with a check to ensure that the keys used for comparison are integers, and only fail if they are not.
This reverts commit 6256734e2d0bdd89f4b5d11da259d40afa0c95c7.

Conflicts:
	activerecord/CHANGELOG.md
2013-11-02 19:56:58 -07:00
David Heinemeier Hansson
661637e5b6 Delegate #rewhere to all on the class like all other relation methods 2013-11-02 19:45:03 -07:00
David Heinemeier Hansson
fe9773414a Move documentation around a bit 2013-11-02 18:32:08 -07:00
David Heinemeier Hansson
0342335473 Merge pull request #12747 from yury/explicit-enum-values
Explicit mapping for enum
2013-11-02 18:29:22 -07:00
Yury Korolev
7caa09c5e1 Explicit mapping for enum 2013-11-02 17:48:16 -07:00
David Heinemeier Hansson
f950b2699f Added ActiveRecord::QueryMethods#rewhere which will overwrite an existing, named where condition. 2013-11-02 17:36:45 -07:00
Rafael Mendonça França
4d7080f80c unscope now works on default_scope after 94924dc32baf78f13e289172534c2e71c9c8cade 2013-11-02 22:11:20 -02:00
David Heinemeier Hansson
09447929a0 Add a test case for the scope enum adds 2013-11-02 16:18:31 -07:00
David Heinemeier Hansson
e94e97ca79 Extend ActiveRecord::Base#cache_key to take an optional list of timestamp attributes of which the highest will be used. 2013-11-02 16:05:19 -07:00
David Heinemeier Hansson
6d30219c27 Merge branch 'master' of github.com:rails/rails 2013-11-02 15:40:39 -07:00
David Heinemeier Hansson
423249504a Added Numeric#in_milliseconds, like 1.hour.in_milliseconds, so we can feed them to JavaScript functions like getTime(). 2013-11-02 15:40:16 -07:00
Carlos Antonio da Silva
a2f27385f6 Use an already existing fixture 2013-11-02 18:13:02 -02:00
Carlos Antonio da Silva
6963e8959f Fix to work on Ruby 1.9.3, example and changelog improvements 2013-11-02 18:08:37 -02:00
Guillermo Iguaran
e3e7786b0f Improve wording in AC::ParameterMissing error message 2013-11-02 14:41:35 -05:00
Carlos Antonio da Silva
e474e47bfa Update guides welcome page to point to version 3.2.15 [ci skip] 2013-11-02 17:31:22 -02:00
Guillermo Iguaran
f886fe2d8c Revert "Merge pull request #9660 from sebasoga/change_strong_parameters_require_behaviour"
This reverts commit c2b5a8e61ba0f35015e6ac949a5c8fce2042a1f2, reversing
changes made to 1918b12c0429caec2a6134ac5e5b42ade103fe90.

See: https://github.com/rails/rails/pull/9660#issuecomment-27627493
2013-11-02 14:30:03 -05:00