Commit Graph

40505 Commits

Author SHA1 Message Date
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
David Heinemeier Hansson
db41eb8a6e Added ActiveRecord::Base#enum for declaring enum attributes where the values map to integers in the database, but can be queried by name 2013-11-02 12:01:31 -07:00
Carlos Antonio da Silva
deaf285824 Merge pull request #12686 from kryzhovnik/master
Minor doc fix of ActiveModel::Naming. [ci skip]

Conflicts:
	activemodel/lib/active_model/naming.rb
2013-11-02 14:46:56 -02:00
Guillermo Iguaran
c2b5a8e61b Merge pull request #9660 from sebasoga/change_strong_parameters_require_behaviour
Change ActionController::Parameters#require behavior when value is empty
2013-11-01 17:28:05 -07:00
Rafael Mendonça França
1918b12c04 Fix wrong behavior where associations with dependent: :destroy options
was using nullify strategy

This caused a regression in applications trying to upgrade.

Also if the user set the dependent option as destroy he expects to get
the records removed from the database.
2013-11-01 19:04:30 -02:00
Rafael Mendonça França
d9e70501a4 Merge pull request #12739 from laurocaetano/remove_warnings_for_ruby_trunk
Remove warnings on ruby trunk
2013-11-01 13:27:27 -07:00
laurocaetano
d48222d22e remove warnings on ruby trunk 2013-11-01 18:15:53 -02:00
Rafael Mendonça França
a221b30b3f Test with the right association 2013-11-01 14:26:05 -02:00
Rafael Mendonça França
9616a7ee1a Merge pull request #12733 from robin850/fix-railties-build
Fix railties build
2013-11-01 08:23:06 -07:00
Rafael Mendonça França
f8483dd48b Merge pull request #12735 from linstula/fix-typo-in-responder-comment
Fix typo in method description in Responder class
2013-11-01 08:18:54 -07:00
Rafael Mendonça França
fe64edec3d Merge pull request #12728 from arunagw/aa-warnings-removed-ruby-trunk
More Warnings removed for ruby trunk
2013-11-01 08:10:48 -07:00
Lin Reid
56d3862541 Fix typo in method description in Responder class
Fixes a typo in the description for the call class method in Responder.
2013-11-01 10:58:25 -04:00
Rafael Mendonça França
09ce1df7aa 💣 2013-11-01 11:59:47 -02:00
Rafael Mendonça França
fe21c8589f Use consistent order of the arguments 2013-11-01 11:58:40 -02:00
Robin Dupret
bca36b080b Fix some failing tests for Rails::Paths
Since we are not using the File.exists? alias which raises a warning on
current ruby trunk, few stubs are wrong.
2013-11-01 14:42:12 +01:00
Robin Dupret
1a566c87cb Set the destination_root for plugins
Since the plugin generator is relying on the application one, we need to
define the proper root when creating the plugin. The AppBase class is
not setting the destination_root (this is done via the AppGenerator)
2013-11-01 14:40:29 +01:00
Arun Agrawal
dbdb25463c shadowing variable warning removed 2013-11-01 13:47:23 +01:00
Arun Agrawal
c10a78124c More Warnings removed for ruby trunk
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
2013-11-01 13:47:23 +01:00