Commit Graph

32292 Commits

Author SHA1 Message Date
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
Janko Marohnić
2033db171a Fix documentation mistakes 2012-08-21 16:58:34 +02:00
Rafael Mendonça França
ace0692528 Merge pull request #7000 from kennyj/fix_6697-3
Use instance_accessor: false instead of instance_writer.
2012-08-21 07:50:35 -07:00
kennyj
57bef99073 Use instance_accessor: false instead of instance_writer. 2012-08-21 23:40:28 +09:00
Rafael Mendonça França
55d943c567 Add CHANGELOG entry for #6986 2012-08-21 10:18:10 -03:00
Rafael Mendonça França
245fb737db Merge pull request #6986 from kennyj/fix_6975
Fix #6975. Round usec when writing timestamp attribute.
2012-08-21 10:14:00 -03:00
kennyj
e9d2ad395e Round usec when writing timestamp attribute. 2012-08-21 10:12:13 -03:00
Carlos Antonio da Silva
15e2b80a27 Minor refactoring in Active Record model schema methods
* Use each_key instead of generating intermediate keys array.
* Use each_with_object instead of inject to build hash.
* Use ternary to return instead of if + assignment.
2012-08-21 00:50:43 -03:00
Aaron Patterson
e7ffa77932 removing dead code 2012-08-20 16:12:59 -07:00
Aaron Patterson
f734ec4807 define singleton methods rather than adding and removing methods 2012-08-20 16:12:09 -07:00
Aaron Patterson
79d21dddd6 remove dead code 2012-08-20 15:32:50 -07:00
Aaron Patterson
503bee0111 initialize instance variables for transactions to remove conditionals 2012-08-20 15:08:49 -07:00
Aaron Patterson
075b91454b This method is useless without a block, so remove test 2012-08-20 15:08:49 -07:00
Aaron Patterson
a4697b0cc3 remove unused variable 2012-08-20 15:08:49 -07:00
Aaron Patterson
73eeb51ea5 initialize instance variables to avoid conditionals 2012-08-20 15:08:48 -07:00
Aaron Patterson
d0d4ef6e8b fix whitespace errors 2012-08-20 15:08:48 -07:00
Xavier Noria
f298481b36 Revert "removes unused optional argument in AS::Dependencies::Loadable#load"
This argument is there because that's the signature of Kernel#load.

This reverts commit bf3fa34ed0aa33bca3aac9c96165662fe864a7b4.
2012-08-20 23:59:36 +02:00
Xavier Noria
bf3fa34ed0 removes unused optional argument in AS::Dependencies::Loadable#load 2012-08-20 23:55:28 +02:00
Rafael Mendonça França
81d596aa7f Revert "association_basics, updated how inverse_of works"
This reverts commit 8cb9460437eddde6952fbebbc969203cd4d00294.

Reason: #7377 was merged and it fixes this behavior.
2012-08-20 15:51:35 -03:00