Commit Graph

41624 Commits

Author SHA1 Message Date
Xavier Noria
7afd92e60b adds a section about booleans in the API guidelines [ci skip] 2014-02-09 12:29:45 +01:00
Zachary Scott
605c81b9de Use full-length version of multiple from c7abc51 2014-02-09 12:29:00 +01:00
Yves Senn
4e4a92e78a docs, link MySQL manual for multi column indexes. [ci ckip].
Closes #9131.
2014-02-09 12:28:50 +01:00
Zachary Scott
17b0edde57 Specify what #starts_with? we're talking about. Also added a note what
kind of exception we should expect for this internal comment.
2014-02-09 12:27:43 +01:00
Zachary Scott
dbe3345c4f Fix grammar of internal comment and modify it's location 2014-02-09 12:27:36 +01:00
Calvin Tam
2fdbd599be Fixed spelling error: extracetd => extracted 2014-02-07 20:02:34 +11:00
Vipul A M
9cc4dadb0b Remove old comments about suppressing warnings. 2014-01-25 14:04:09 +05:30
Vipul A M
3e28b7c2bb framwork => framework 2014-01-24 12:40:21 +05:30
Vipul A M
5b31da4881 easiy => easy 2014-01-24 12:37:24 +05:30
Vipul A M
1adaf6ca9f requies => requires 2014-01-24 12:32:17 +05:30
Zachary Scott
3d5c4a1647 Remove duplicate configuration option for ActiveSupport [ci skip]
Fixes rails/rails#13732
2014-01-16 11:06:10 -08:00
Waynn Lue
6900b3e6ed add punctuation 2014-01-13 12:15:52 -08:00
Waynn Lue
4dbc62dabd e-mail => email, and subject/verb agreement 2014-01-13 11:56:00 -08:00
Waynn Lue
6a45a690a2 change to "check out" 2014-01-08 18:02:25 -08:00
Vijay Dev
c4fb191a4c Merge branch 'master' of github.com:lifo/docrails 2013-12-31 22:44:34 +05:30
Godfrey Chan
f3a8be3b8b Merge pull request #13131 from gja/changed-accepts-values
Allows you to check if a field has changed to a particular value
2013-12-30 22:05:56 -08:00
Rafael Mendonça França
969a0778cd Merge pull request #13541 from schneems/schneems/db-url-sub-key
Allow "url" sub key in database.yml configuration
2013-12-30 19:36:06 -08:00
schneems
5b96027ef6 Allow "url" sub key in database.yml configuration
Currently a developer can pass in a YAML configuration that fully specifies connection information:

```
production:
  database: triage_production
  adapter: password
  pool: 5
```

They can also pass in a string that specifies a connection URL directly to an environment key:

```
production: postgresql://localhost/foo
```

This PR allows the use of both a connection url and specifying connection attributes via YAML through the use of the "url" sub key:

```
production:
  url: postgresql://localhost/foo
  pool: 3
```

This will allow developers to inherit Active Record options such as `pool` from `&defaults` and still use a secure connection url such as `<%= ENV['DATABASE_URL'] %>`. The URL is expanded into a hash and then merged back into the YAML hash. If there are any conflicts, the values from the connection URL are preferred. 

Talked this over with @josevalim
2013-12-30 12:21:14 -05:00
Richard Schneeman
16e93561e2 Merge pull request #13536 from schneems/schneems/connection-spec-docs
[ci skip] ConnectionSpecification::Resolver Docs
2013-12-30 07:54:24 -08:00
schneems
8c82ee838e [ci skip] ConnectionSpecification::Resolver Docs
Document the internal interfaces of `ConnectionSpecification::Resolver`

Change method name from `config` to `env` to better match the most common use case.
2013-12-30 10:54:03 -05:00
Xavier Noria
08a87c1e2c Merge pull request #13539 from StevenNunez/patch-1
Update explanation to match example [ci skip]
2013-12-30 07:30:16 -08:00
Steven Nunez
ff47b0518b Update explanation to match example 2013-12-30 09:51:19 -05:00
Yves Senn
2ab3bd16f9 tidy AR CHANGELOG. [ci skip] 2013-12-30 12:18:45 +01:00
Yves Senn
d2aa3324a9 Merge pull request #13538 from robin850/patch-14
Add a missing changelog entry for #13534 [ci skip]
2013-12-30 03:16:02 -08:00
Robin Dupret
ec4b44b1a4 Add a missing changelog entry for #13534 [ci skip] 2013-12-30 12:15:14 +01:00
Piotr Sarnacki
3d865c1bcd Remove deprecation warning for FIXTURES_PATH
FIXTURES_PATH has a bit different case than DatabaseTasks.fixtures_path,
which was added along with deprecation. A use case for FIXTURES_PATH
could be loading fixtures from a different directory just for a given
test run. The implementation is fairly simple, so leaving it as it is
won't hurt.
2013-12-30 09:59:13 +01:00
Piotr Sarnacki
2be2003d06 Revert "Install bundle gems to the system not to vendor/bundle"
This reverts commit 875dd3edfd34eaa20120b6589b0d1905230e948f.

The issue was fixed in rbx-2.2.3
2013-12-30 09:55:28 +01:00
Rafael Mendonça França
4a3e2a0156 Merge pull request #13535 from schneems/schneems/extract-url-logic
Extract db url connection logic to class
2013-12-29 17:23:09 -08:00
schneems
137c0e573b Extract db url connection logic to class 2013-12-29 19:48:51 -05:00
José Valim
10721450de Merge pull request #13527 from kuldeepaggarwal/f-independent-specs
Use user-defined configurations in mysql tests
2013-12-29 12:32:06 -08:00
José Valim
524ad8f572 Merge pull request #13534 from kuldeepaggarwal/f-where-not
raise ArgumentError for nil in .where.not
2013-12-29 12:25:21 -08:00
Kuldeep Aggarwal
a2985e2067 raise ArgumentError exception if Model.where.not is called with nil argument 2013-12-30 01:53:02 +05:30
Andrew White
436ed51711 Fix Encoding::CompatibilityError when public path is UTF-8
In #5337 we forced the path encoding to ASCII-8BIT to prevent static
file handling from blowing up before an application has had chance to
deal with possibly invalid urls. However this has a negative side
effect of making it an incompatible encoding if the application's
public path has UTF-8 characters in it.

To work around the problem we check to see if the path has a valid
encoding once it has been unescaped. If it is not valid then we can
return early since it will not match any file anyway.

Fixes #13518
2013-12-29 18:38:53 +00:00
Andrew White
54ccc58c62 Fix method redefined warning message in mapper.rb 2013-12-29 17:55:54 +00:00
Piotr Sarnacki
15e2eb42a7 Install bundle gems to the system not to vendor/bundle
Rubinius has problems with bundling when shared gems are disabled (ie.
when --path or --deployhment is used). There is no real reason to
install it with --path on TravisCI, so I'm dropping it.
2013-12-29 15:54:51 +01:00
Kuldeep Aggarwal
143da09f51 used user-defined configurations for running tests that might depend on user's system configuration 2013-12-29 13:57:52 +05:30
Xavier Noria
126dc47665 blank? and present? commit to return singletons [Xavier Noria & Pavel Pravosud]
The contract of blank? and present? was in principle to return Object, as we
generally do, the test suite and description was consistent with that, but some
examples had comments like "# => true".

This cannot be unclear, we either fix the examples, or update the contract.

Since users may be already assuming singletons due to the examples and the fact
that they were returned before 30ba7ee, the safest option seems to be to revise
the contract and the implementation of String#blank?

The motivation for 30ba7ee was to improve the performance of the predicate, the
refactor based on === is on par regarding speed.

With this commit we start documenting return types using YARD conventions. We
plan to document return types gradually.
2013-12-28 20:03:38 +01:00
Xavier Noria
7b8944681f Merge pull request #13517 from jetthoughts/13516_blank_to_return_true_false
String#blank? returns True/False
2013-12-28 06:54:16 -08:00
Paul Nikitochkin
37513b10a8 Extracted blank matcher regexp to constant 2013-12-28 16:52:14 +02:00
Yves Senn
f66f483d90 Merge pull request #13514 from kuldeepaggarwal/f-removed-warnings
Removed warnings: setting `changed_attributes` instance variable if it is already initialized.
2013-12-28 04:42:31 -08:00
Kuldeep Aggarwal
e8253d3a64 setting changed_attributes instance variable if it is already initialized. 2013-12-28 17:05:51 +05:30
Arun Agrawal
c60edddc0f Merge pull request #13513 from ilja/master
Typo fix [ci skip]
2013-12-28 02:39:13 -08:00
Ilja Krijger
1196bec8e0 Typo fix [ci skip] 2013-12-28 11:24:01 +01:00
Guillermo Iguaran
04108f214c Merge branch 'master' of github.com:rails/rails 2013-12-27 15:02:57 -05:00
Yves Senn
4fd3204a04 Merge pull request #13474 from jdelStrother/becomes
Copy changed_attributes across to newly become'd records
2013-12-27 11:15:19 -08:00
Norman Clarke
ef28028c45 Update to Unicode 6.3.0
6.3.0 was released on September 30, 2013.

http://unicode-inc.blogspot.com.ar/2013/09/announcing-unicode-standard-version-63.html
2013-12-27 14:56:54 -03:00
Jonathan del Strother
b7bf025374 Copy changed_attributes across to newly become'd records
Without this, the original record's values won't get saved, since the partial insertions support (144e8691cb) checks for changed values and thinks there are none.
2013-12-27 15:54:06 +00:00
Yves Senn
b33555d3ef Merge pull request #13505 from robin850/patch-13
Ensure backward compatibility between Minitest 5 and 4
2013-12-27 02:34:37 -08:00
Robin Dupret
a9444916ee Ensure backward compatibility between Minitest 5 and 4
Define Minitest::Test in case we are running the gist under Minitest 4
and avoid relying on MiniTest::Unit::TestCase to avoid displaying
warning on version five.

[ci skip]
2013-12-27 11:30:53 +01:00
Yves Senn
864514a460 Merge pull request #13483 from aditya-kapoor/add-missing-slashes
Adding missing backslashes in active_model files so as to avoid unwanted [ci skip]
2013-12-27 01:13:02 -08:00