rails 4.1.4 → 4.2.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +12 -10
- data/guides/CHANGELOG.md +87 -15
- data/guides/Rakefile +21 -6
- data/guides/assets/images/getting_started/article_with_comments.png +0 -0
- data/guides/assets/javascripts/guides.js +6 -0
- data/guides/assets/stylesheets/main.css +4 -1
- data/guides/bug_report_templates/action_controller_gem.rb +3 -3
- data/guides/bug_report_templates/action_controller_master.rb +3 -2
- data/guides/bug_report_templates/active_record_gem.rb +1 -1
- data/guides/bug_report_templates/generic_gem.rb +15 -0
- data/guides/bug_report_templates/generic_master.rb +26 -0
- data/guides/rails_guides/helpers.rb +1 -1
- data/guides/rails_guides/levenshtein.rb +27 -21
- data/guides/rails_guides/markdown/renderer.rb +1 -1
- data/guides/rails_guides/markdown.rb +11 -7
- data/guides/rails_guides.rb +2 -2
- data/guides/source/2_2_release_notes.md +1 -1
- data/guides/source/2_3_release_notes.md +4 -4
- data/guides/source/3_0_release_notes.md +8 -8
- data/guides/source/3_1_release_notes.md +6 -3
- data/guides/source/3_2_release_notes.md +6 -3
- data/guides/source/4_0_release_notes.md +6 -3
- data/guides/source/4_1_release_notes.md +10 -11
- data/guides/source/4_2_release_notes.md +877 -0
- data/guides/source/_license.html.erb +1 -1
- data/guides/source/_welcome.html.erb +6 -8
- data/guides/source/action_controller_overview.md +28 -11
- data/guides/source/action_mailer_basics.md +97 -29
- data/guides/source/action_view_overview.md +142 -191
- data/guides/source/active_job_basics.md +339 -0
- data/guides/source/active_model_basics.md +371 -17
- data/guides/source/active_record_basics.md +25 -24
- data/guides/source/active_record_callbacks.md +12 -9
- data/guides/source/{migrations.md → active_record_migrations.md} +135 -226
- data/guides/source/active_record_postgresql.md +433 -0
- data/guides/source/active_record_querying.md +270 -262
- data/guides/source/active_record_validations.md +24 -14
- data/guides/source/active_support_core_extensions.md +115 -123
- data/guides/source/active_support_instrumentation.md +10 -18
- data/guides/source/api_documentation_guidelines.md +63 -17
- data/guides/source/asset_pipeline.md +266 -125
- data/guides/source/association_basics.md +96 -80
- data/guides/source/autoloading_and_reloading_constants.md +1311 -0
- data/guides/source/caching_with_rails.md +32 -7
- data/guides/source/command_line.md +52 -30
- data/guides/source/configuring.md +161 -33
- data/guides/source/contributing_to_ruby_on_rails.md +198 -114
- data/guides/source/credits.html.erb +2 -2
- data/guides/source/debugging_rails_applications.md +448 -294
- data/guides/source/development_dependencies_install.md +47 -36
- data/guides/source/documents.yaml +19 -7
- data/guides/source/engines.md +217 -196
- data/guides/source/form_helpers.md +79 -56
- data/guides/source/generators.md +24 -11
- data/guides/source/getting_started.md +361 -222
- data/guides/source/i18n.md +113 -69
- data/guides/source/index.html.erb +1 -0
- data/guides/source/initialization.md +110 -63
- data/guides/source/layout.html.erb +5 -11
- data/guides/source/layouts_and_rendering.md +26 -26
- data/guides/source/maintenance_policy.md +26 -4
- data/guides/source/nested_model_forms.md +7 -4
- data/guides/source/plugins.md +27 -27
- data/guides/source/rails_application_templates.md +21 -3
- data/guides/source/rails_on_rack.md +12 -10
- data/guides/source/routing.md +115 -75
- data/guides/source/ruby_on_rails_guides_guidelines.md +11 -12
- data/guides/source/security.md +41 -35
- data/guides/source/testing.md +199 -119
- data/guides/source/upgrading_ruby_on_rails.md +319 -32
- data/guides/source/working_with_javascript_in_rails.md +19 -17
- data/guides/w3c_validator.rb +2 -0
- metadata +42 -95
- data/guides/code/getting_started/Gemfile +0 -40
- data/guides/code/getting_started/Gemfile.lock +0 -125
- data/guides/code/getting_started/README.rdoc +0 -28
- data/guides/code/getting_started/Rakefile +0 -6
- data/guides/code/getting_started/app/assets/javascripts/application.js +0 -15
- data/guides/code/getting_started/app/assets/javascripts/comments.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/javascripts/posts.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/javascripts/welcome.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/application.css +0 -13
- data/guides/code/getting_started/app/assets/stylesheets/comments.css.scss +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/posts.css.scss +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/welcome.css.scss +0 -3
- data/guides/code/getting_started/app/controllers/application_controller.rb +0 -5
- data/guides/code/getting_started/app/controllers/comments_controller.rb +0 -23
- data/guides/code/getting_started/app/controllers/posts_controller.rb +0 -53
- data/guides/code/getting_started/app/controllers/welcome_controller.rb +0 -4
- data/guides/code/getting_started/app/helpers/application_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/comments_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/posts_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/welcome_helper.rb +0 -2
- data/guides/code/getting_started/app/models/comment.rb +0 -3
- data/guides/code/getting_started/app/models/post.rb +0 -7
- data/guides/code/getting_started/app/views/comments/_comment.html.erb +0 -15
- data/guides/code/getting_started/app/views/comments/_form.html.erb +0 -13
- data/guides/code/getting_started/app/views/layouts/application.html.erb +0 -14
- data/guides/code/getting_started/app/views/posts/_form.html.erb +0 -27
- data/guides/code/getting_started/app/views/posts/edit.html.erb +0 -5
- data/guides/code/getting_started/app/views/posts/index.html.erb +0 -21
- data/guides/code/getting_started/app/views/posts/new.html.erb +0 -5
- data/guides/code/getting_started/app/views/posts/show.html.erb +0 -18
- data/guides/code/getting_started/app/views/welcome/index.html.erb +0 -4
- data/guides/code/getting_started/bin/bundle +0 -4
- data/guides/code/getting_started/bin/rails +0 -4
- data/guides/code/getting_started/bin/rake +0 -4
- data/guides/code/getting_started/config/application.rb +0 -18
- data/guides/code/getting_started/config/boot.rb +0 -4
- data/guides/code/getting_started/config/database.yml +0 -25
- data/guides/code/getting_started/config/environment.rb +0 -5
- data/guides/code/getting_started/config/environments/development.rb +0 -30
- data/guides/code/getting_started/config/environments/production.rb +0 -80
- data/guides/code/getting_started/config/environments/test.rb +0 -36
- data/guides/code/getting_started/config/initializers/backtrace_silencers.rb +0 -7
- data/guides/code/getting_started/config/initializers/filter_parameter_logging.rb +0 -4
- data/guides/code/getting_started/config/initializers/inflections.rb +0 -16
- data/guides/code/getting_started/config/initializers/locale.rb +0 -9
- data/guides/code/getting_started/config/initializers/mime_types.rb +0 -5
- data/guides/code/getting_started/config/initializers/secret_token.rb +0 -12
- data/guides/code/getting_started/config/initializers/session_store.rb +0 -3
- data/guides/code/getting_started/config/initializers/wrap_parameters.rb +0 -14
- data/guides/code/getting_started/config/locales/en.yml +0 -23
- data/guides/code/getting_started/config/routes.rb +0 -7
- data/guides/code/getting_started/config.ru +0 -4
- data/guides/code/getting_started/db/migrate/20130122042648_create_posts.rb +0 -10
- data/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb +0 -11
- data/guides/code/getting_started/db/schema.rb +0 -33
- data/guides/code/getting_started/db/seeds.rb +0 -7
- data/guides/code/getting_started/public/404.html +0 -60
- data/guides/code/getting_started/public/422.html +0 -60
- data/guides/code/getting_started/public/500.html +0 -59
- data/guides/code/getting_started/public/favicon.ico +0 -0
- data/guides/code/getting_started/public/robots.txt +0 -5
- data/guides/code/getting_started/test/controllers/comments_controller_test.rb +0 -7
- data/guides/code/getting_started/test/controllers/posts_controller_test.rb +0 -7
- data/guides/code/getting_started/test/controllers/welcome_controller_test.rb +0 -9
- data/guides/code/getting_started/test/fixtures/comments.yml +0 -11
- data/guides/code/getting_started/test/fixtures/posts.yml +0 -9
- data/guides/code/getting_started/test/helpers/comments_helper_test.rb +0 -4
- data/guides/code/getting_started/test/helpers/posts_helper_test.rb +0 -4
- data/guides/code/getting_started/test/helpers/welcome_helper_test.rb +0 -4
- data/guides/code/getting_started/test/models/comment_test.rb +0 -7
- data/guides/code/getting_started/test/models/post_test.rb +0 -7
- 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
|
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
|
-
$
|
52
|
+
$ brew install sqlite3
|
52
53
|
```
|
53
54
|
|
54
|
-
|
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
|
-
#
|
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://
|
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
|
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
|
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
|
-
#
|
210
|
-
#
|
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:
|
248
|
+
$ bundle exec rake db:mysql:build
|
245
249
|
```
|
246
250
|
|
247
|
-
PostgreSQL's authentication works differently.
|
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
|
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:
|
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:
|
17
|
-
url:
|
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
|