Commit Graph

32310 Commits

Author SHA1 Message Date
Gabriel Sobrinho
2f3eb484f2 Accept a symbol for :in option on inclusion and exclusion validators 2012-08-24 15:26:17 -03:00
Rafael Mendonça França
2c571b3f05 Merge pull request #7058 from frodsan/fix_as_random_tests
Fix tests that depend on run order
2012-08-24 08:56:16 -07:00
Xavier Noria
6a70f2dd6b simplifies a regexp
The new regexp has less work to do, we anchor a fixed string at the end
and need no group.
2012-08-24 01:17:00 +02:00
Aaron Patterson
2abe950236 ivar will always be defined, so stop checking 2012-08-23 15:08:07 -07:00
Aaron Patterson
8d8fd13179 mysql does not build on Ruby 2.0.0 at the moment 2012-08-23 15:07:55 -07:00
Francesco Rodriguez
73f0afd1d4 Fix ActionMailer tests that depend on run order 2012-08-23 16:15:31 -05:00
Francesco Rodriguez
961957d570 Fix ActiveModel tests that depend on run order 2012-08-23 16:00:58 -05:00
Francesco Rodriguez
cc14a3b2c1 Fix ActiveSupport tests that depend on run order 2012-08-23 16:00:58 -05:00
Aaron Patterson
e8afb84b13 Merge pull request #7434 from frodsan/select_list_arguments
Model.select takes a variable list of arguments
2012-08-23 12:04:30 -07:00
Isaac Sanders
7bf9db529e Model.select takes a variable list of arguments.
This is a cleaner version of #6916.

Closes #3165.
2012-08-23 13:51:10 -05:00
Vijay Dev
764deabd85 Merge pull request #7061 from davidcelis/master
Update the documentation for the :autosave option on belongs_to
2012-08-23 08:12:17 -07:00
David Celis
230d7f7600 Update the documentation for the :autosave option
I've noticed a caveat with the :autosave option biting people before.
Questions arise about why they must explicitly save an associated object
in their own before_save callbacks. I've updated the documentation as
such to note to users that the :autosave callback occurs before any
user defined callbacks. They must save the associated record themselves
if altering it in their own callbacks.

Signed-off-by: David Celis <david@davidcelis.com>
2012-08-23 07:44:43 -07:00
José Valim
891043d5d0 Revert "Use join without default separator"
This reverts commit b0ab8dc0b2b0f580ffe5ac9ff57fd13152e18577
because it was removing the contents of the message when we
did not have any tag. A test case is also committed.
2012-08-23 11:01:55 -03:00
José Valim
e8eb68c19a Fix failure on middleware/exceptions_test
The reason the test was failing was because when the test
invokes `app.config`, the app is loaded and, as `eager_load`
is set to true, it disables the dependency loading mechanism,
so controllers that are later defined are not loaded.
2012-08-23 10:24:19 -03:00
Rafael Mendonça França
16fbe6f3e3 Update the ducumentation about the before_eager_load callback [ci skip] 2012-08-22 22:12:24 -03:00
Rafael Mendonça França
7f1dc4ad45 before_eager_load only runs when eager_load is true 2012-08-22 22:05:52 -03:00
Aaron Patterson
6a79aa7f81 skip the memcache tests if the memcache server is not up 2012-08-22 15:42:48 -07:00
Xavier Noria
8b16ff64f2 revises a brittle test in Active Support
The revised test assumed that the default permissions of a file
matched the umask of the process, but in the general case that
depends also on the file system. This test was failing in the
/vagrant shared folder of Rails development boxes.
2012-08-22 23:10:33 +02:00
Vijay Dev
79e880f7f4 edit secret token template comment [ci skip] 2012-08-23 01:07:35 +05:30
Vijay Dev
6431753851 copy edit the time_ago_in_words helper docs 2012-08-23 00:24:22 +05:30
Vijay Dev
8fbfeb1ef7 Merge pull request #7398 from iamvery/time_ago_in_words-docs
Extended documentation for `time_ago_in_words` helper
2012-08-22 11:44:58 -07:00
Vijay Dev
5c89e07596 Merge branch 'master' of github.com:lifo/docrails 2012-08-22 23:51:17 +05:30
Carlos Antonio da Silva
d850fdf566 Merge pull request #7413 from siong1987/secret_token
Remind user a good way to generate a secret code [ci skip]
2012-08-22 04:33:50 -07:00
Teng Siong Ong
0d809f6129 remind user a good way to generate a secret code. 2012-08-21 20:37:58 -07:00
Soon Van
9356d1b2d4 giving a pause usually made for e.g. in sentences [ci skip] 2012-08-21 23:37:47 -04:00
Rafael Mendonça França
d168c1f7a7 Merge pull request #6606 from amatsuda/ar_relation_model_method
AR::Relation#model would be a better API than AR::Relation#klass
2012-08-21 14:43:19 -07:00
Rafael Mendonça França
8c6fcbc2b1 Add CHANGELOG entry for #3578 [ci skip] 2012-08-21 18:39:37 -03:00
Rafael Mendonça França
d65a15dca6 Merge pull request #3578 from amatsuda/remove_j_alias_for_json_escape
Remove j alias for ERB::Util.json_escape
2012-08-21 14:18:38 -07:00
Carlos Antonio da Silva
973b278598 Remove app building setup/teardown for remote ip railtie tests
These tests rely on "make_basic_app", which is a faster version that
does not need to create the whole app directory structure.
2012-08-21 17:37:52 -03:00
Carlos Antonio da Silva
b85894e854 Set eager load option in "make_basic_app" for railties tests
Avoid output with config option not set when running some tests.
2012-08-21 17:36:00 -03:00
José Valim
6bef1469d2 Merge pull request #7225 from rails/eager_load
Improve eager load on Rails
2012-08-21 12:58:25 -07:00
Carlos Antonio da Silva
11e890fef8 Merge pull request #6499 from lazylester/patch-1
Clarify and correct the description for the --full option of the 
plugin_new generator. [ci skip]
2012-08-21 12:35:30 -07:00
lazylester
7f765da7a7 Clarify and correct the description for the --full option of the plugin_new generator 2012-08-21 12:22:21 -07:00
Rafael Mendonça França
f89d5e4603 Use a model without counter cache to test read-only attributes 2012-08-21 15:47:02 -03:00
Aaron Patterson
da3d28ea33 add Rack::Lock for webrick 2012-08-21 14:47:43 -03:00
José Valim
5d416b9078 Deprecate config.threadsafe! 2012-08-21 14:47:43 -03:00
José Valim
2801786e1a Get rid of config.preload_frameworks in favor of config.eager_load_namespaces
The new option allows any Ruby namespace to be registered and set
up for eager load. We are effectively exposing the structure existing
in Rails since v3.0 for all developers in order to make their applications
thread-safe and CoW friendly.
2012-08-21 14:47:19 -03:00
José Valim
a1687e48cb Make ActiveSupport::Autoload local
Previously, ActiveSupport::Autoload was global and reserved
for usage inside Rails. This pull request makes it local,
fixes its test (they were not being run because its file
was named wrongly) and make it part of Rails public API.
2012-08-21 14:46:12 -03:00
José Valim
11bc3487ab Remove allow_concurrency as a flag
The flag was mainly used to add a Rack::Lock middleware to
the stack, but the only scenario the lock is desired is in
development.

If you are deploying on a not-threaded server, the Rack::Lock
does not provide any benefit since you don't have concurrent
accesses. On the other hand, if you are on a threaded server,
you don't want the lock, since it defeats the purpose of using
a threaded server.

If there is someone out there, running on a thread server
and does want a lock, it can be added to your environment
as easy as: `use Rack::Lock`
2012-08-21 14:46:12 -03:00
José Valim
e6747d87f3 Allow users to choose when to eager_load the application or not.
Previously, the eager load behavior was mostly coupled to
config.cache_classes, however this was suboptimal since in
some environments a developer may want to cache classes but
not necessarily load them all on boot (for example, test env).

This pull request also promotes the use of config.eager_load
set to true by default in production. In the majority of the
cases, this is the behavior you want since it will copy most
of your app into memory on boot (which was also the previous
behavior).

Finally, this fix a long standing Rails bug where it was
impossible to access a model in a rake task when Rails was
set as thread safe.
2012-08-21 14:46:12 -03:00
Rafael Mendonça França
df1a5e492a Merge pull request #5210 from Pliny/masteri
Fix for #5200
2012-08-21 14:10:36 -03:00
Dave Desrochers
ff0d9b93b9 reset_counters() was crashing when there were multiple belongs_to associations with the same foreign key.
This closes #5200.
2012-08-21 14:10:11 -03:00
Rafael Mendonça França
684a040437 Add CHANGELOG entry for #7410 2012-08-21 13:43:43 -03:00
Rafael Mendonça França
ce0dd56183 Merge pull request #7410 from sandeepravi/default_options_helper_value
option_tags coerced to "" instead of nil

Closes #7404
2012-08-21 09:37:13 -07:00
Sandeep
99322266b8 option_tags coerced to "" instead of nil 2012-08-21 21:59:05 +05:30
Rafael Mendonça França
5c4fe858d7 Merge pull request #7409 from kennyj/refactor_activerecord_result
Refactor AR::Result or inherits. Because we have redundant codes about column_types.
2012-08-21 09:28:56 -07:00
kennyj
5e47ba0a85 Refactor AR::Result or inherits. Because we have redundant codes about 2012-08-22 01:23:40 +09:00
Carlos Antonio da Silva
8c600e45cd Merge pull request #7408 from yahonda/sqlmode_mysql
Change mysql tests for strict mode disabled to work with new sql_mode default in MySQL 5.6.6-m9.

Since this MySQL version, the sql_mode default value is `NO_ENGINE_SUBSTITUTION`.
2012-08-21 09:01:31 -07:00
Yasuo Honda
babc24c1b0 Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_mode
Reason since MySQL 5.6.6-m9 the `sql_mode` default value is
`NO_ENGINE_SUBSTITUTION`.
This default parameter change is out of control from Rails.

This test verifies Rails not overriding the default `@@GLOBAL.sql_mode` value
by checking if `@@GLOBAL.sql_mode` is the same as `@@SESSION.sql_mode`.
2012-08-22 00:56:23 +09:00
Rafael Mendonça França
7e68e8bcc7 Merge pull request #7406 from janko-m/documentation_fixes
Fixed some documentation mistakes
2012-08-21 08:04:19 -07:00