rails 4.2.3 → 4.2.4.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e087cbe55af0d08158b557b367f6c2659f0ec1d
4
- data.tar.gz: 7971fa171d28124f22623f145367afb5522cfdbd
3
+ metadata.gz: 9ab480a9349258d547cf643e294506a555a2bafb
4
+ data.tar.gz: a3327b5c0bc2a5fb57fd194fff7646d2ae492136
5
5
  SHA512:
6
- metadata.gz: 560d2cdea938f753a4cca004bd54299acb334f7782d69110dd9124ec4f8b18b8a6755d1d2fa33e8c8712b2b5cb138aa70bfd95dddce0e83825fc698cb1a53b0c
7
- data.tar.gz: 79c1412cb6b5a021128ec34108bc67bbdb984808748199dfc868e18d05a9f53ba7b773d056c4e4d7399412e5371286bf93696d04098f90dedf71093069bd8c6f
6
+ metadata.gz: 3dd803e8f91ad73e46768b42654e9c9ae4f99c902220f662381daaad3db05e82539d9c6ca9d184294a4e2fd98c44e8f5cd5b94f653d1ff882bc323c43875ab2e
7
+ data.tar.gz: 17660e83ef56d345e9c93e36a86284eaa3cf35571da3820d3f0120c97f2e99e225ddd5d34b4270d0fe3b6feaf0b1bb8f77f2c6a1da8626615b71981661268095
@@ -1,3 +1,8 @@
1
+ ## Rails 4.2.4 (August 14, 2015) ##
2
+
3
+ * No Changes *
4
+
5
+
1
6
  ## Rails 4.2.3 (June 25, 2015) ##
2
7
 
3
8
  * No Changes *
@@ -1110,14 +1110,6 @@ If `@article.author_ids` is [1], this would return:
1110
1110
  <input name="article[author_ids][]" type="hidden" value="" />
1111
1111
  ```
1112
1112
 
1113
- #### country_options_for_select
1114
-
1115
- Returns a string of option tags for pretty much any country in the world.
1116
-
1117
- #### country_select
1118
-
1119
- Returns select and option tags for the given object and method, using country_options_for_select to generate the list of option tags.
1120
-
1121
1113
  #### option_groups_from_collection_for_select
1122
1114
 
1123
1115
  Returns a string of `option` tags, like `options_from_collection_for_select`, but groups them by `optgroup` tags based on the object relationships of the arguments.
@@ -266,6 +266,19 @@ UserMailer.welcome(@user).deliver_later
266
266
  ```
267
267
 
268
268
 
269
+ Internationalization
270
+ --------------------
271
+
272
+ Each job uses the `I18n.locale` set when the job was created. Useful if you send
273
+ emails asynchronously:
274
+
275
+ ```ruby
276
+ I18n.locale = :eo
277
+
278
+ UserMailer.welcome(@user).deliver_later # Email will be localized to Esparanto.
279
+ ```
280
+
281
+
269
282
  GlobalID
270
283
  --------
271
284
 
@@ -258,7 +258,7 @@ david = User.find_by(name: 'David')
258
258
 
259
259
  ```ruby
260
260
  # find all users named David who are Code Artists and sort by created_at in reverse chronological order
261
- users = User.where(name: 'David', occupation: 'Code Artist').order('created_at DESC')
261
+ users = User.where(name: 'David', occupation: 'Code Artist').order(created_at: :desc)
262
262
  ```
263
263
 
264
264
  You can learn more about querying an Active Record model in the [Active Record
@@ -944,8 +944,9 @@ own custom validators.
944
944
 
945
945
  You can also create methods that verify the state of your models and add
946
946
  messages to the `errors` collection when they are invalid. You must then
947
- register these methods by using the `validate` class method, passing in the
948
- symbols for the validation methods' names.
947
+ register these methods by using the `validate`
948
+ ([API](http://api.rubyonrails.org/classes/ActiveModel/Validations/ClassMethods.html#method-i-validate))
949
+ class method, passing in the symbols for the validation methods' names.
949
950
 
950
951
  You can pass more than one symbol for each class method and the respective
951
952
  validations will be run in the same order as they were registered.
@@ -305,17 +305,6 @@ Action Mailer
305
305
  }
306
306
  ```
307
307
 
308
- ActiveResource
309
- --------------
310
-
311
- ### request.active_resource
312
-
313
- | Key | Value |
314
- | -------------- | -------------------- |
315
- | `:method` | HTTP method |
316
- | `:request_uri` | Complete URI |
317
- | `:result` | HTTP response object |
318
-
319
308
  Active Support
320
309
  --------------
321
310
 
@@ -281,7 +281,7 @@ You can run a single test through ruby. For instance:
281
281
 
282
282
  ```bash
283
283
  $ cd actionmailer
284
- $ ruby -w -Itest test/mail_layout_test.rb -n test_explicit_class_layout
284
+ $ bundle exec ruby -w -Itest test/mail_layout_test.rb -n test_explicit_class_layout
285
285
  ```
286
286
 
287
287
  The `-n` option allows you to run a single method instead of the whole
@@ -1536,20 +1536,17 @@ class CreateComments < ActiveRecord::Migration
1536
1536
  create_table :comments do |t|
1537
1537
  t.string :commenter
1538
1538
  t.text :body
1539
-
1540
- # this line adds an integer column called `article_id`.
1541
- t.references :article, index: true
1539
+ t.references :article, index: true, foreign_key: true
1542
1540
 
1543
1541
  t.timestamps null: false
1544
1542
  end
1545
- add_foreign_key :comments, :articles
1546
1543
  end
1547
1544
  end
1548
1545
  ```
1549
1546
 
1550
- The `t.references` line sets up a foreign key column for the association between
1551
- the two models. An index for this association is also created on this column.
1552
- Go ahead and run the migration:
1547
+ The `t.references` line creates an integer column called `article_id`, an index
1548
+ for it, and a foreign key constraint that points to the `articles` table. Go
1549
+ ahead and run the migration:
1553
1550
 
1554
1551
  ```bash
1555
1552
  $ bin/rake db:migrate
@@ -1562,8 +1559,6 @@ run against the current database, so in this case you will just see:
1562
1559
  == CreateComments: migrating =================================================
1563
1560
  -- create_table(:comments)
1564
1561
  -> 0.0115s
1565
- -- add_foreign_key(:comments, :articles)
1566
- -> 0.0000s
1567
1562
  == CreateComments: migrated (0.0119s) ========================================
1568
1563
  ```
1569
1564
 
@@ -227,7 +227,7 @@ or, for a single case:
227
227
  resources :articles, path: '/admin/articles'
228
228
  ```
229
229
 
230
- In each of these cases, the named routes remain the same as if you did not use `scope`. In the last case, the following paths map to `PostsController`:
230
+ In each of these cases, the named routes remain the same as if you did not use `scope`. In the last case, the following paths map to `ArticlesController`:
231
231
 
232
232
  | HTTP Verb | Path | Controller#Action | Named Helper |
233
233
  | --------- | ------------------------ | -------------------- | ---------------------- |
@@ -611,6 +611,8 @@ get 'photos/:id', to: 'photos#show', defaults: { format: 'jpg' }
611
611
 
612
612
  Rails would match `photos/12` to the `show` action of `PhotosController`, and set `params[:format]` to `"jpg"`.
613
613
 
614
+ NOTE: You cannot override defaults via query parameters - this is for security reasons. The only defaults that can be overridden are dynamic segments via substitution in the URL path.
615
+
614
616
  ### Naming Routes
615
617
 
616
618
  You can specify a name for any route using the `:as` option:
@@ -355,7 +355,7 @@ This gem uses Ajax to speed up page rendering in most applications.
355
355
 
356
356
  Turbolinks attaches a click handler to all `<a>` on the page. If your browser
357
357
  supports
358
- [PushState](https://developer.mozilla.org/en-US/docs/DOM/Manipulating_the_browser_history#The_pushState(\).C2.A0method),
358
+ [PushState](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history#The_pushState%28%29_method),
359
359
  Turbolinks will make an Ajax request for the page, parse the response, and
360
360
  replace the entire `<body>` of the page with the `<body>` of the response. It
361
361
  will then use PushState to change the URL to the correct one, preserving
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.3
4
+ version: 4.2.4.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,112 +16,112 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.3
19
+ version: 4.2.4.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.3
26
+ version: 4.2.4.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.3
33
+ version: 4.2.4.rc1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.3
40
+ version: 4.2.4.rc1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: actionview
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 4.2.3
47
+ version: 4.2.4.rc1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 4.2.3
54
+ version: 4.2.4.rc1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activemodel
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 4.2.3
61
+ version: 4.2.4.rc1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 4.2.3
68
+ version: 4.2.4.rc1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: activerecord
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 4.2.3
75
+ version: 4.2.4.rc1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 4.2.3
82
+ version: 4.2.4.rc1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: actionmailer
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 4.2.3
89
+ version: 4.2.4.rc1
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 4.2.3
96
+ version: 4.2.4.rc1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: activejob
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 4.2.3
103
+ version: 4.2.4.rc1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 4.2.3
110
+ version: 4.2.4.rc1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: railties
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 4.2.3
117
+ version: 4.2.4.rc1
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 4.2.3
124
+ version: 4.2.4.rc1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -400,8 +400,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
400
400
  version: 1.8.11
401
401
  requirements: []
402
402
  rubyforge_project:
403
- rubygems_version: 2.4.5
403
+ rubygems_version: 2.4.7
404
404
  signing_key:
405
405
  specification_version: 4
406
406
  summary: Full-stack web application framework.
407
407
  test_files: []
408
+ has_rdoc: