- 04 1月, 2014 1 次提交
-
-
由 Godfrey Chan 提交于
Previously, this would give an `ArgumentError`: class Issue < ActiveRecord::Base enum :status, [:open, :finished] end Issue.open.build # => ArgumentError: '0' is not a valid status Issue.open.create # => ArgumentError: '0' is not a valid status PR #13542 muted the error, but the issue remains. This commit fixes the issue by allowing the enum value to be written directly via the setter: Issue.new.status = 0 # This now sets status to :open Assigning a value directly via the setter like this is not part of the documented public API, so users should not rely on this behavior. Closes #13530.
-
- 03 1月, 2014 5 次提交
-
-
由 Yves Senn 提交于
These methods were only used for the `IdentityMap` which was removed. They are no longer used internally and should be removed without replacement. As they were not `:nodoc:`'ed it's better to deprecate them before removal.
-
由 Rafael Mendonça França 提交于
Use DATABASE_URL by default
-
由 schneems 提交于
See https://github.com/rails/rails/pull/13463#issuecomment-31480799 for full conversation.
-
由 Rafael Mendonça França 提交于
provide correct information [ci skip]
-
由 Jon Leighton 提交于
Automatically maintain test database schema
-
- 02 1月, 2014 21 次提交
-
-
由 Kuldeep Aggarwal 提交于
-
由 Jon Leighton 提交于
* Move check from generated helper to test_help.rb, so that all applications can benefit * Rather than just raising when the test schema has pending migrations, try to load in the schema and only raise if there are pending migrations afterwards * Opt out of the check by setting config.active_record.maintain_test_schema = false * Deprecate db:test:* tasks. The test helper is now fully responsible for maintaining the test schema, so we don't need rake tasks for this. This is also a speed improvement since we're no longer reloading the test database on every call to "rake test".
-
由 Andrew White 提交于
Ruby 2.1.0 includes the json gem 1.8.1 by default so we need bundler 1.5.1 for `bundle install` to work. To fix this reverse the downgrade to 1.3.5 and wrap the `run_generator` call with a block that resets `THOR_DEBUG`.
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Since rbx and jruby builds are being allowed to fail lets receive the build information early enabling this option See http://about.travis-ci.org/blog/2013-11-27-fast-finishing-builds/
-
由 Rafael Mendonça França 提交于
Move default production database to URL sub key
-
由 Andrew White 提交于
Bundler sets the THOR_DEBUG environment variable causing Thor to re-raise exceptions on exit. This is breaking the railties tests for generators where we are trying to capture error output. The PR bundler/bundler#2794 fixes this by adding a per-instance config `:debug` but this has not been released yet so to prevent errors going unnoticed downgrade bundler to 1.3.5 until such a time that 1.5.2 has been released.
-
由 schneems 提交于
By using the URL sub key in the `database.yml` by default we are exposing the ability to set other attributes such as `pool` or `reap_frequency` without need of modifying the URL to contain non-connection specific information.
-
由 Rafael Mendonça França 提交于
Fix enum writers when using integers
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Use `Array#wrap` instead `Array()`
-
由 Mo Omer 提交于
[ci skip]
-
由 Rafael Mendonça França 提交于
Closes #13566
-
由 Rafael Mendonça França 提交于
Closes #13565
-
由 Andrew White 提交于
Lazy loading the tzinfo library doesn't really buy us anything because the gem is installed as a dependency via the gemspec and if a developer is using Active Support outside of Rails then they can cherry pick which files to load anyway. Fixes #13553
-
由 Lauro Caetano 提交于
2014 is here.
-
由 Vipul A M 提交于
-
由 Robin Dupret 提交于
Add a mention about the automatic generation of scopes based on the allowed values of the field on the enum documentation.
-
由 Robin Dupret 提交于
Previously, the writer methods would simply check whether the passed argument was the symbol representing the integer value of an enum field. Therefore, it was not possible to specify the numeric value itself but the dynamically defined scopes generate where clauses relying on this kind of values so a chained call to a method like `find_or_initialize_by` would trigger an `ArgumentError`. Reference #13530
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Fix for #13437 Conflicts: activerecord/CHANGELOG.md
-
- 01 1月, 2014 13 次提交
-
-
由 Rafael Mendonça França 提交于
Update grant statement to address #13549
-
由 Rafael Mendonça França 提交于
Avoid raising a NameError on FreeBSD using Date
-
由 Robin Dupret 提交于
[ci skip] Add missing flash message in block filter example.
-
由 Robin Dupret 提交于
The Date object has a xmlschema method starting with Ruby 1.9 so we were assuming that we could safely remove this method and redefine it later but the call to remove_method throws a NameError on FreeBSD so we should rely on remove_possible_method instead. This call is actually needed to avoid warnings when running the test suite. Fixes #11723
-
由 Juanito Fatas 提交于
Also make all three examples consistent.
-
由 Arun Agrawal 提交于
Fix comment syntax
-
由 Andrew White 提交于
Example: # application routes.rb mount BlogEngine => '/blog' # engine routes.rb get '/welcome' => redirect('') This now redirects to the path `/blog`, whereas before it would redirect to the application root path. In the case of a path redirect or a custom redirect if the path returned contains a host then the path is treated as absolute. Similarly for option redirects, if the options hash returned contains a `:host` or `:domain` key then the path is treated as absolute. Fixes #7977
-
由 Brian Cardarella 提交于
The code syntax in the comment example is invalid
-
由 Yasuo Honda 提交于
to make this grant statement described in the document works GRANT ALL PRIVILEGES ON inexistent_activerecord_unittest.* to 'rails'@'localhost';
-
由 Yasuo Honda 提交于
-
由 Godfrey Chan 提交于
Add the ability to nullize the enum column
-
由 Amr Tamimi 提交于
-
由 Rafael Mendonça França 提交于
-