rails 4.1.6 → 4.2.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +12 -10
  3. data/guides/CHANGELOG.md +64 -17
  4. data/guides/Rakefile +21 -6
  5. data/guides/assets/images/getting_started/article_with_comments.png +0 -0
  6. data/guides/assets/javascripts/guides.js +6 -0
  7. data/guides/assets/stylesheets/main.css +4 -1
  8. data/guides/bug_report_templates/action_controller_gem.rb +3 -3
  9. data/guides/bug_report_templates/action_controller_master.rb +3 -2
  10. data/guides/bug_report_templates/active_record_gem.rb +1 -1
  11. data/guides/bug_report_templates/generic_gem.rb +15 -0
  12. data/guides/bug_report_templates/generic_master.rb +26 -0
  13. data/guides/rails_guides/helpers.rb +1 -1
  14. data/guides/rails_guides/levenshtein.rb +27 -21
  15. data/guides/rails_guides/markdown/renderer.rb +1 -1
  16. data/guides/rails_guides/markdown.rb +11 -7
  17. data/guides/rails_guides.rb +2 -2
  18. data/guides/source/2_2_release_notes.md +1 -1
  19. data/guides/source/2_3_release_notes.md +4 -4
  20. data/guides/source/3_0_release_notes.md +8 -8
  21. data/guides/source/3_1_release_notes.md +6 -3
  22. data/guides/source/3_2_release_notes.md +6 -3
  23. data/guides/source/4_0_release_notes.md +6 -3
  24. data/guides/source/4_1_release_notes.md +9 -10
  25. data/guides/source/4_2_release_notes.md +877 -0
  26. data/guides/source/_license.html.erb +1 -1
  27. data/guides/source/_welcome.html.erb +6 -8
  28. data/guides/source/action_controller_overview.md +25 -8
  29. data/guides/source/action_mailer_basics.md +97 -29
  30. data/guides/source/action_view_overview.md +142 -191
  31. data/guides/source/active_job_basics.md +339 -0
  32. data/guides/source/active_model_basics.md +371 -17
  33. data/guides/source/active_record_basics.md +25 -24
  34. data/guides/source/active_record_callbacks.md +12 -9
  35. data/guides/source/{migrations.md → active_record_migrations.md} +95 -220
  36. data/guides/source/active_record_postgresql.md +433 -0
  37. data/guides/source/active_record_querying.md +264 -268
  38. data/guides/source/active_record_validations.md +23 -13
  39. data/guides/source/active_support_core_extensions.md +115 -123
  40. data/guides/source/active_support_instrumentation.md +10 -18
  41. data/guides/source/api_documentation_guidelines.md +63 -17
  42. data/guides/source/asset_pipeline.md +259 -120
  43. data/guides/source/association_basics.md +96 -80
  44. data/guides/source/autoloading_and_reloading_constants.md +1311 -0
  45. data/guides/source/caching_with_rails.md +32 -7
  46. data/guides/source/command_line.md +52 -30
  47. data/guides/source/configuring.md +161 -33
  48. data/guides/source/contributing_to_ruby_on_rails.md +198 -114
  49. data/guides/source/credits.html.erb +2 -2
  50. data/guides/source/debugging_rails_applications.md +440 -286
  51. data/guides/source/development_dependencies_install.md +47 -36
  52. data/guides/source/documents.yaml +19 -7
  53. data/guides/source/engines.md +217 -196
  54. data/guides/source/form_helpers.md +79 -56
  55. data/guides/source/generators.md +24 -11
  56. data/guides/source/getting_started.md +359 -219
  57. data/guides/source/i18n.md +110 -66
  58. data/guides/source/index.html.erb +1 -0
  59. data/guides/source/initialization.md +109 -62
  60. data/guides/source/layout.html.erb +5 -11
  61. data/guides/source/layouts_and_rendering.md +26 -26
  62. data/guides/source/maintenance_policy.md +6 -3
  63. data/guides/source/nested_model_forms.md +7 -4
  64. data/guides/source/plugins.md +27 -27
  65. data/guides/source/rails_application_templates.md +21 -3
  66. data/guides/source/rails_on_rack.md +8 -5
  67. data/guides/source/routing.md +113 -73
  68. data/guides/source/ruby_on_rails_guides_guidelines.md +11 -12
  69. data/guides/source/security.md +40 -34
  70. data/guides/source/testing.md +199 -119
  71. data/guides/source/upgrading_ruby_on_rails.md +289 -31
  72. data/guides/source/working_with_javascript_in_rails.md +19 -17
  73. data/guides/w3c_validator.rb +2 -0
  74. metadata +42 -95
  75. data/guides/code/getting_started/Gemfile +0 -40
  76. data/guides/code/getting_started/Gemfile.lock +0 -125
  77. data/guides/code/getting_started/README.rdoc +0 -28
  78. data/guides/code/getting_started/Rakefile +0 -6
  79. data/guides/code/getting_started/app/assets/javascripts/application.js +0 -15
  80. data/guides/code/getting_started/app/assets/javascripts/comments.js.coffee +0 -3
  81. data/guides/code/getting_started/app/assets/javascripts/posts.js.coffee +0 -3
  82. data/guides/code/getting_started/app/assets/javascripts/welcome.js.coffee +0 -3
  83. data/guides/code/getting_started/app/assets/stylesheets/application.css +0 -13
  84. data/guides/code/getting_started/app/assets/stylesheets/comments.css.scss +0 -3
  85. data/guides/code/getting_started/app/assets/stylesheets/posts.css.scss +0 -3
  86. data/guides/code/getting_started/app/assets/stylesheets/welcome.css.scss +0 -3
  87. data/guides/code/getting_started/app/controllers/application_controller.rb +0 -5
  88. data/guides/code/getting_started/app/controllers/comments_controller.rb +0 -23
  89. data/guides/code/getting_started/app/controllers/posts_controller.rb +0 -53
  90. data/guides/code/getting_started/app/controllers/welcome_controller.rb +0 -4
  91. data/guides/code/getting_started/app/helpers/application_helper.rb +0 -2
  92. data/guides/code/getting_started/app/helpers/comments_helper.rb +0 -2
  93. data/guides/code/getting_started/app/helpers/posts_helper.rb +0 -2
  94. data/guides/code/getting_started/app/helpers/welcome_helper.rb +0 -2
  95. data/guides/code/getting_started/app/models/comment.rb +0 -3
  96. data/guides/code/getting_started/app/models/post.rb +0 -7
  97. data/guides/code/getting_started/app/views/comments/_comment.html.erb +0 -15
  98. data/guides/code/getting_started/app/views/comments/_form.html.erb +0 -13
  99. data/guides/code/getting_started/app/views/layouts/application.html.erb +0 -14
  100. data/guides/code/getting_started/app/views/posts/_form.html.erb +0 -27
  101. data/guides/code/getting_started/app/views/posts/edit.html.erb +0 -5
  102. data/guides/code/getting_started/app/views/posts/index.html.erb +0 -21
  103. data/guides/code/getting_started/app/views/posts/new.html.erb +0 -5
  104. data/guides/code/getting_started/app/views/posts/show.html.erb +0 -18
  105. data/guides/code/getting_started/app/views/welcome/index.html.erb +0 -4
  106. data/guides/code/getting_started/bin/bundle +0 -4
  107. data/guides/code/getting_started/bin/rails +0 -4
  108. data/guides/code/getting_started/bin/rake +0 -4
  109. data/guides/code/getting_started/config/application.rb +0 -18
  110. data/guides/code/getting_started/config/boot.rb +0 -4
  111. data/guides/code/getting_started/config/database.yml +0 -25
  112. data/guides/code/getting_started/config/environment.rb +0 -5
  113. data/guides/code/getting_started/config/environments/development.rb +0 -30
  114. data/guides/code/getting_started/config/environments/production.rb +0 -80
  115. data/guides/code/getting_started/config/environments/test.rb +0 -36
  116. data/guides/code/getting_started/config/initializers/backtrace_silencers.rb +0 -7
  117. data/guides/code/getting_started/config/initializers/filter_parameter_logging.rb +0 -4
  118. data/guides/code/getting_started/config/initializers/inflections.rb +0 -16
  119. data/guides/code/getting_started/config/initializers/locale.rb +0 -9
  120. data/guides/code/getting_started/config/initializers/mime_types.rb +0 -5
  121. data/guides/code/getting_started/config/initializers/secret_token.rb +0 -12
  122. data/guides/code/getting_started/config/initializers/session_store.rb +0 -3
  123. data/guides/code/getting_started/config/initializers/wrap_parameters.rb +0 -14
  124. data/guides/code/getting_started/config/locales/en.yml +0 -23
  125. data/guides/code/getting_started/config/routes.rb +0 -7
  126. data/guides/code/getting_started/config.ru +0 -4
  127. data/guides/code/getting_started/db/migrate/20130122042648_create_posts.rb +0 -10
  128. data/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb +0 -11
  129. data/guides/code/getting_started/db/schema.rb +0 -33
  130. data/guides/code/getting_started/db/seeds.rb +0 -7
  131. data/guides/code/getting_started/public/404.html +0 -60
  132. data/guides/code/getting_started/public/422.html +0 -60
  133. data/guides/code/getting_started/public/500.html +0 -59
  134. data/guides/code/getting_started/public/favicon.ico +0 -0
  135. data/guides/code/getting_started/public/robots.txt +0 -5
  136. data/guides/code/getting_started/test/controllers/comments_controller_test.rb +0 -7
  137. data/guides/code/getting_started/test/controllers/posts_controller_test.rb +0 -7
  138. data/guides/code/getting_started/test/controllers/welcome_controller_test.rb +0 -9
  139. data/guides/code/getting_started/test/fixtures/comments.yml +0 -11
  140. data/guides/code/getting_started/test/fixtures/posts.yml +0 -9
  141. data/guides/code/getting_started/test/helpers/comments_helper_test.rb +0 -4
  142. data/guides/code/getting_started/test/helpers/posts_helper_test.rb +0 -4
  143. data/guides/code/getting_started/test/helpers/welcome_helper_test.rb +0 -4
  144. data/guides/code/getting_started/test/models/comment_test.rb +0 -7
  145. data/guides/code/getting_started/test/models/post_test.rb +0 -7
  146. data/guides/code/getting_started/test/test_helper.rb +0 -12
@@ -45,36 +45,14 @@ $ cd rails
45
45
 
46
46
  The test suite must pass with any submitted code. No matter whether you are writing a new patch, or evaluating someone else's, you need to be able to run the tests.
47
47
 
48
- Install first libxml2 and libxslt together with their development files for Nokogiri. In Ubuntu that's
48
+ Install first SQLite3 and its development files for the `sqlite3` gem. Mac OS X
49
+ users are done with:
49
50
 
50
51
  ```bash
51
- $ sudo apt-get install libxml2 libxml2-dev libxslt1-dev
52
+ $ brew install sqlite3
52
53
  ```
53
54
 
54
- If you are on Fedora or CentOS, you can run
55
-
56
- ```bash
57
- $ sudo yum install libxml2 libxml2-devel libxslt libxslt-devel
58
- ```
59
-
60
- If you are running Arch Linux, you're done with:
61
-
62
- ```bash
63
- $ sudo pacman -S libxml2 libxslt
64
- ```
65
-
66
- On FreeBSD, you just have to run:
67
-
68
- ```bash
69
- # pkg_add -r libxml2 libxslt
70
- ```
71
-
72
- Alternatively, you can install the `textproc/libxml2` and `textproc/libxslt`
73
- ports.
74
-
75
- If you have any problems with these libraries, you can install them manually by compiling the source code. Just follow the instructions at the [Red Hat/CentOS section of the Nokogiri tutorials](http://nokogiri.org/tutorials/installing_nokogiri.html#red_hat__centos) .
76
-
77
- Also, SQLite3 and its development files for the `sqlite3-ruby` gem - in Ubuntu you're done with just
55
+ In Ubuntu you're done with just:
78
56
 
79
57
  ```bash
80
58
  $ sudo apt-get install sqlite3 libsqlite3-dev
@@ -95,12 +73,12 @@ $ sudo pacman -S sqlite
95
73
  For FreeBSD users, you're done with:
96
74
 
97
75
  ```bash
98
- # pkg_add -r sqlite3
76
+ # pkg install sqlite3
99
77
  ```
100
78
 
101
79
  Or compile the `databases/sqlite3` port.
102
80
 
103
- Get a recent version of [Bundler](http://gembundler.com/)
81
+ Get a recent version of [Bundler](http://bundler.io/)
104
82
 
105
83
  ```bash
106
84
  $ gem install bundler
@@ -117,7 +95,7 @@ This command will install all dependencies except the MySQL and PostgreSQL Ruby
117
95
 
118
96
  NOTE: If you would like to run the tests that use memcached, you need to ensure that you have it installed and running.
119
97
 
120
- You can use homebrew to install memcached on OSX:
98
+ You can use [Homebrew](http://brew.sh/) to install memcached on OS X:
121
99
 
122
100
  ```bash
123
101
  $ brew install memcached
@@ -135,6 +113,20 @@ Or use yum on Fedora or CentOS:
135
113
  $ sudo yum install memcached
136
114
  ```
137
115
 
116
+ If you are running on Arch Linux:
117
+
118
+ ```bash
119
+ $ sudo pacman -S memcached
120
+ ```
121
+
122
+ For FreeBSD users, you're done with:
123
+
124
+ ```bash
125
+ # pkg install memcached
126
+ ```
127
+
128
+ Alternatively, you can compile the `databases/memcached` port.
129
+
138
130
  With the dependencies now installed, you can run the test suite with:
139
131
 
140
132
  ```bash
@@ -181,7 +173,19 @@ The Active Record test suite requires a custom config file: `activerecord/test/c
181
173
 
182
174
  #### MySQL and PostgreSQL
183
175
 
184
- To be able to run the suite for MySQL and PostgreSQL we need their gems. Install first the servers, their client libraries, and their development files. In Ubuntu just run
176
+ To be able to run the suite for MySQL and PostgreSQL we need their gems. Install
177
+ first the servers, their client libraries, and their development files.
178
+
179
+ On OS X, you can run:
180
+
181
+ ```bash
182
+ $ brew install mysql
183
+ $ brew install postgresql
184
+ ```
185
+
186
+ Follow the instructions given by Homebrew to start these.
187
+
188
+ In Ubuntu just run:
185
189
 
186
190
  ```bash
187
191
  $ sudo apt-get install mysql-server libmysqlclient15-dev
@@ -206,8 +210,8 @@ $ sudo pacman -S postgresql postgresql-libs
206
210
  FreeBSD users will have to run the following:
207
211
 
208
212
  ```bash
209
- # pkg_add -r mysql56-client mysql56-server
210
- # pkg_add -r postgresql92-client postgresql92-server
213
+ # pkg install mysql56-client mysql56-server
214
+ # pkg install postgresql93-client postgresql93-server
211
215
  ```
212
216
 
213
217
  Or install them through ports (they are located under the `databases` folder).
@@ -241,20 +245,27 @@ and create the test databases:
241
245
 
242
246
  ```bash
243
247
  $ cd activerecord
244
- $ bundle exec rake mysql:build_databases
248
+ $ bundle exec rake db:mysql:build
245
249
  ```
246
250
 
247
- PostgreSQL's authentication works differently. A simple way to set up the development environment for example is to run with your development account
251
+ PostgreSQL's authentication works differently. To setup the development environment
252
+ with your development account, on Linux or BSD, you just have to run:
248
253
 
249
254
  ```bash
250
255
  $ sudo -u postgres createuser --superuser $USER
251
256
  ```
252
257
 
253
- and then create the test databases with
258
+ and for OS X:
259
+
260
+ ```bash
261
+ $ createuser --superuser $USER
262
+ ```
263
+
264
+ Then you need to create the test databases with
254
265
 
255
266
  ```bash
256
267
  $ cd activerecord
257
- $ bundle exec rake postgresql:build_databases
268
+ $ bundle exec rake db:postgresql:build
258
269
  ```
259
270
 
260
271
  It is possible to build databases for both PostgreSQL and MySQL with
@@ -13,8 +13,8 @@
13
13
  url: active_record_basics.html
14
14
  description: This guide will get you started with models, persistence to database and the Active Record pattern and library.
15
15
  -
16
- name: Rails Database Migrations
17
- url: migrations.html
16
+ name: Active Record Migrations
17
+ url: active_record_migrations.html
18
18
  description: This guide covers how you can use Active Record migrations to alter your database in a structured and organized manner.
19
19
  -
20
20
  name: Active Record Validations
@@ -32,6 +32,11 @@
32
32
  name: Active Record Query Interface
33
33
  url: active_record_querying.html
34
34
  description: This guide covers the database query interface provided by Active Record.
35
+ -
36
+ name: Active Model basics
37
+ url: active_model_basics.html
38
+ description: This guide covers the use of model classes without Active Record.
39
+ work_in_progress: true
35
40
  -
36
41
  name: Views
37
42
  documents:
@@ -74,6 +79,10 @@
74
79
  name: Action Mailer Basics
75
80
  url: action_mailer_basics.html
76
81
  description: This guide describes how to use Action Mailer to send and receive emails.
82
+ -
83
+ name: Active Job Basics
84
+ url: active_job_basics.html
85
+ description: This guide provides you with all you need to get started in creating, enqueueing and executing background jobs.
77
86
  -
78
87
  name: Testing Rails Applications
79
88
  url: testing.html
@@ -95,11 +104,6 @@
95
104
  name: Rails Command Line Tools and Rake Tasks
96
105
  url: command_line.html
97
106
  description: This guide covers the command line tools and rake tasks provided by Rails.
98
- -
99
- name: Caching with Rails
100
- work_in_progress: true
101
- url: caching_with_rails.html
102
- description: Various caching techniques provided by Rails.
103
107
  -
104
108
  name: Asset Pipeline
105
109
  url: asset_pipeline.html
@@ -118,6 +122,10 @@
118
122
  work_in_progress: true
119
123
  url: initialization.html
120
124
  description: This guide explains the internals of the Rails initialization process as of Rails 4
125
+ -
126
+ name: Autoloading and Reloading Constants
127
+ url: autoloading_and_reloading_constants.html
128
+ description: This guide documents how autoloading and reloading constants work.
121
129
  -
122
130
  name: Extending Rails
123
131
  documents:
@@ -163,6 +171,10 @@
163
171
  name: Upgrading Ruby on Rails
164
172
  url: upgrading_ruby_on_rails.html
165
173
  description: This guide helps in upgrading applications to latest Ruby on Rails versions.
174
+ -
175
+ name: Ruby on Rails 4.2 Release Notes
176
+ url: 4_2_release_notes.html
177
+ description: Release notes for Rails 4.2.
166
178
  -
167
179
  name: Ruby on Rails 4.1 Release Notes
168
180
  url: 4_1_release_notes.html