hexabat 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +20 -0
- data/.rvmrc +1 -0
- data/.travis.yml +12 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +119 -0
- data/Rakefile +32 -0
- data/features/callbacks.feature +21 -0
- data/features/fixtures/100_open_issues.rb +3500 -0
- data/features/fixtures/300_closed_issues.rb +9515 -0
- data/features/fixtures/single_open_issue.rb +60 -0
- data/features/step_definitions/callbacks.rb +74 -0
- data/features/support/env.rb +37 -0
- data/hexabat.gemspec +26 -0
- data/lib/hexabat/client.rb +68 -0
- data/lib/hexabat/importer.rb +45 -0
- data/lib/hexabat/issue_count.rb +49 -0
- data/lib/hexabat/page_range.rb +126 -0
- data/lib/hexabat/page_request_builder.rb +76 -0
- data/lib/hexabat/page_response_processor.rb +35 -0
- data/lib/hexabat/version.rb +3 -0
- data/lib/hexabat.rb +26 -0
- data/spec/hexabat/client_spec.rb +45 -0
- data/spec/hexabat/importer_spec.rb +36 -0
- data/spec/hexabat/issue_count_spec.rb +42 -0
- data/spec/hexabat/page_range_spec.rb +121 -0
- data/spec/hexabat/page_request_buider_spec.rb +47 -0
- data/spec/hexabat/page_response_processor_spec.rb +42 -0
- data/spec/hexabat_spec.rb +23 -0
- metadata +211 -0
@@ -0,0 +1,3500 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
|
3
|
+
A_100_OPEN_ISSUES = %q{
|
4
|
+
[
|
5
|
+
{
|
6
|
+
"body": "When a non-empty string that casts to zero is assigned to a number column already containing zero, then _field_changed? should not become true.\n\nFixes a bug(?) introduced some time in 3.2\n(It is working in 3.0.15, but broken in 3.2.8)\n\n",
|
7
|
+
"milestone": null,
|
8
|
+
"labels": [
|
9
|
+
|
10
|
+
],
|
11
|
+
"user": {
|
12
|
+
"gravatar_id": "9a43d1985eaeebd9afeab6c15f29709e",
|
13
|
+
"avatar_url": "https://secure.gravatar.com/avatar/9a43d1985eaeebd9afeab6c15f29709e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
14
|
+
"login": "bkuo",
|
15
|
+
"url": "https://api.github.com/users/bkuo",
|
16
|
+
"id": 119251
|
17
|
+
},
|
18
|
+
"closed_at": null,
|
19
|
+
"created_at": "2012-09-10T17:01:45Z",
|
20
|
+
"comments": 1,
|
21
|
+
"title": "Fixes _field_changed?",
|
22
|
+
"state": "open",
|
23
|
+
"pull_request": {
|
24
|
+
"patch_url": "https://github.com/rails/rails/pull/7590.patch",
|
25
|
+
"html_url": "https://github.com/rails/rails/pull/7590",
|
26
|
+
"diff_url": "https://github.com/rails/rails/pull/7590.diff"
|
27
|
+
},
|
28
|
+
"number": 7590,
|
29
|
+
"html_url": "https://github.com/rails/rails/issues/7590",
|
30
|
+
"updated_at": "2012-09-10T17:06:59Z",
|
31
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7590",
|
32
|
+
"assignee": null,
|
33
|
+
"id": 6767072
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"body": "All as of http://www.postgresql.org/docs/9.1/static/datatype-binary.html bytea-strings have to be escaped with leading \"E\" as in\n\n```\nINSERT INTO table (col) VALUES (E'\\\\101foo')\n```\n\nand not as in\n\n```\nINSERT INTO table (col) VALUES ('\\\\101foo')\n```\n\nThe difference is, whether 4 bytes (41666f6f, correct) or whether 7 bytes (5c313031666f6f, incorrect) are stored. \n\nSpecifically, https://github.com/rails/rails/blob/232d2223ebcfe5c9e0425c821f5d30a7d5968512/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb#L46 needs to be changed by adding an 'E' prefix.\n\nThis data loss bug has been introduced more than 2 years ago by this https://github.com/rails/rails/commit/dac80f779d357b2df6fabdda33dac56c69c2a6f9#L0L379 commit.",
|
37
|
+
"milestone": null,
|
38
|
+
"labels": [
|
39
|
+
{
|
40
|
+
"name": "activerecord",
|
41
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
42
|
+
"color": "0b02e1"
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"user": {
|
46
|
+
"gravatar_id": "26768a10b719085717862dcca374c374",
|
47
|
+
"avatar_url": "https://secure.gravatar.com/avatar/26768a10b719085717862dcca374c374?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
48
|
+
"login": "xb",
|
49
|
+
"url": "https://api.github.com/users/xb",
|
50
|
+
"id": 51794
|
51
|
+
},
|
52
|
+
"closed_at": null,
|
53
|
+
"created_at": "2012-09-10T16:06:41Z",
|
54
|
+
"comments": 0,
|
55
|
+
"title": "Data corruption: bytea data is not properly escaped",
|
56
|
+
"state": "open",
|
57
|
+
"pull_request": {
|
58
|
+
"patch_url": null,
|
59
|
+
"html_url": null,
|
60
|
+
"diff_url": null
|
61
|
+
},
|
62
|
+
"number": 7589,
|
63
|
+
"html_url": "https://github.com/rails/rails/issues/7589",
|
64
|
+
"updated_at": "2012-09-10T16:06:41Z",
|
65
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7589",
|
66
|
+
"assignee": null,
|
67
|
+
"id": 6765625
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"body": "Recently upgraded from 3.2.1 to 3.2.8 and found that something changed. Controller specs POSTing a hash containing `:format => :json` are no longer stringified, causing `Time.zone.parse` to fail with \n> undefined method 'sub' for Mon, 10 Sep 2012:Date\n\nSample:\n\nIn spec:\n```ruby\nit \"should not fail\" do\n attrs = @attributes.merge(:format => :json) # <= hash without :format => :json has no problems\n post :create, attrs\n ...\nend\n```\n\nIn controller:\n```ruby\ndef create\n params[:thing][:date_field] = tz.parse(params[:thing][:date_field]).utc # <= fails here\n @model = Thing.new(params[:thing])\n ...\nend\n```\n\nTracked down to `Date.convert_american_to_iso(string#Date)`. Snip:\n```ruby\n# Transform american date fromat into ISO format.\ndef convert_american_to_iso(string)\n string.sub(AMERICAN_DATE_RE){|m| \"#$3-#$1-#$2\"}\nend\n```\nwhere the method is clearly expecting a string, but instead is getting a Date object. In other words, `params[:thing][:date_field]` is a Date, not a String, but only in the case when the paramter hash is annotated as JSON.",
|
71
|
+
"milestone": null,
|
72
|
+
"labels": [
|
73
|
+
|
74
|
+
],
|
75
|
+
"user": {
|
76
|
+
"gravatar_id": "c70d0bae41fc4f169ff9a5fea2c99250",
|
77
|
+
"avatar_url": "https://secure.gravatar.com/avatar/c70d0bae41fc4f169ff9a5fea2c99250?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
78
|
+
"login": "adamstrickland",
|
79
|
+
"url": "https://api.github.com/users/adamstrickland",
|
80
|
+
"id": 78512
|
81
|
+
},
|
82
|
+
"closed_at": null,
|
83
|
+
"created_at": "2012-09-10T16:02:05Z",
|
84
|
+
"comments": 1,
|
85
|
+
"title": "Timezone parsing fails for JSON requests in test environment",
|
86
|
+
"state": "open",
|
87
|
+
"pull_request": {
|
88
|
+
"patch_url": null,
|
89
|
+
"html_url": null,
|
90
|
+
"diff_url": null
|
91
|
+
},
|
92
|
+
"number": 7588,
|
93
|
+
"html_url": "https://github.com/rails/rails/issues/7588",
|
94
|
+
"updated_at": "2012-09-10T16:05:13Z",
|
95
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7588",
|
96
|
+
"assignee": null,
|
97
|
+
"id": 6765507
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"body": "If I happen to use a `.rb` file inside `app/assets` it can get automatically loaded, this probably holds true for `app/views`.\n\nI think this is not the intended behavior, [railties has](https://github.com/rails/rails/blob/master/railties/lib/rails/engine/configuration.rb#L38):\n\n```ruby\npaths.add \"app\", :eager_load => true, :glob => \"*\"\npaths.add \"app/assets\", :glob => \"*\"\npaths.add \"app/controllers\", :eager_load => true\npaths.add \"app/helpers\", :eager_load => true\npaths.add \"app/models\", :eager_load => true\npaths.add \"app/mailers\", :eager_load => true\npaths.add \"app/views\"\n```\n\nseems quite clear that the first line refers to all non-specified paths\n\n\nOf course I can fix this per application by adding to `application.rb`:\n\n```ruby\n config.before_initialize do\n config.eager_load_paths = config.eager_load_paths.dup - Dir[\"#{Rails.root}/app/{assets,views}\"]\n end\n```\n",
|
101
|
+
"milestone": null,
|
102
|
+
"labels": [
|
103
|
+
{
|
104
|
+
"name": "bug",
|
105
|
+
"url": "https://api.github.com/repos/rails/rails/labels/bug",
|
106
|
+
"color": "444444"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"name": "railties",
|
110
|
+
"url": "https://api.github.com/repos/rails/rails/labels/railties",
|
111
|
+
"color": "8BE06E"
|
112
|
+
}
|
113
|
+
],
|
114
|
+
"user": {
|
115
|
+
"gravatar_id": "c82630c82a3c675d2928804f432fcf17",
|
116
|
+
"avatar_url": "https://secure.gravatar.com/avatar/c82630c82a3c675d2928804f432fcf17?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
117
|
+
"login": "elia",
|
118
|
+
"url": "https://api.github.com/users/elia",
|
119
|
+
"id": 1051
|
120
|
+
},
|
121
|
+
"closed_at": null,
|
122
|
+
"created_at": "2012-09-10T15:52:53Z",
|
123
|
+
"comments": 0,
|
124
|
+
"title": "Should not eager_load app/assets",
|
125
|
+
"state": "open",
|
126
|
+
"pull_request": {
|
127
|
+
"patch_url": null,
|
128
|
+
"html_url": null,
|
129
|
+
"diff_url": null
|
130
|
+
},
|
131
|
+
"number": 7587,
|
132
|
+
"html_url": "https://github.com/rails/rails/issues/7587",
|
133
|
+
"updated_at": "2012-09-10T15:59:29Z",
|
134
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7587",
|
135
|
+
"assignee": null,
|
136
|
+
"id": 6765243
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"body": "Current realization refactored because there's no sense to capture output in quiet block.\n\nI added commented block in code with my thoughts about this. Since rake task should be always invoked successfully we can check exit status and show to user original error instead of showing \"Probably you didn't install JavaScript runtime\". I'd like to use capture(:stderr) but it's not impossible because it doesn't reopen $std{out,err} and just reassigns it, that does impossible to capture subprocesses.\n",
|
140
|
+
"milestone": null,
|
141
|
+
"labels": [
|
142
|
+
|
143
|
+
],
|
144
|
+
"user": {
|
145
|
+
"gravatar_id": "b97b92886055641a956499b3cbb473e6",
|
146
|
+
"avatar_url": "https://secure.gravatar.com/avatar/b97b92886055641a956499b3cbb473e6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
147
|
+
"login": "route",
|
148
|
+
"url": "https://api.github.com/users/route",
|
149
|
+
"id": 414803
|
150
|
+
},
|
151
|
+
"closed_at": null,
|
152
|
+
"created_at": "2012-09-10T13:42:51Z",
|
153
|
+
"comments": 1,
|
154
|
+
"title": "Rake assets:precompile shouldn't fail quietly.",
|
155
|
+
"state": "open",
|
156
|
+
"pull_request": {
|
157
|
+
"patch_url": "https://github.com/rails/rails/pull/7586.patch",
|
158
|
+
"html_url": "https://github.com/rails/rails/pull/7586",
|
159
|
+
"diff_url": "https://github.com/rails/rails/pull/7586.diff"
|
160
|
+
},
|
161
|
+
"number": 7586,
|
162
|
+
"html_url": "https://github.com/rails/rails/issues/7586",
|
163
|
+
"updated_at": "2012-09-10T13:43:16Z",
|
164
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7586",
|
165
|
+
"assignee": null,
|
166
|
+
"id": 6762185
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"body": "When a non-empty string that casts to zero is assigned to a number column already containing zero, then _field_changed? should not become true.",
|
170
|
+
"milestone": null,
|
171
|
+
"labels": [
|
172
|
+
{
|
173
|
+
"name": "activerecord",
|
174
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
175
|
+
"color": "0b02e1"
|
176
|
+
}
|
177
|
+
],
|
178
|
+
"user": {
|
179
|
+
"gravatar_id": "9a43d1985eaeebd9afeab6c15f29709e",
|
180
|
+
"avatar_url": "https://secure.gravatar.com/avatar/9a43d1985eaeebd9afeab6c15f29709e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
181
|
+
"login": "bkuo",
|
182
|
+
"url": "https://api.github.com/users/bkuo",
|
183
|
+
"id": 119251
|
184
|
+
},
|
185
|
+
"closed_at": null,
|
186
|
+
"created_at": "2012-09-10T09:54:58Z",
|
187
|
+
"comments": 2,
|
188
|
+
"title": "Fixes _field_changed? ",
|
189
|
+
"state": "open",
|
190
|
+
"pull_request": {
|
191
|
+
"patch_url": "https://github.com/rails/rails/pull/7585.patch",
|
192
|
+
"html_url": "https://github.com/rails/rails/pull/7585",
|
193
|
+
"diff_url": "https://github.com/rails/rails/pull/7585.diff"
|
194
|
+
},
|
195
|
+
"number": 7585,
|
196
|
+
"html_url": "https://github.com/rails/rails/issues/7585",
|
197
|
+
"updated_at": "2012-09-10T16:06:33Z",
|
198
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7585",
|
199
|
+
"assignee": null,
|
200
|
+
"id": 6757593
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"body": "basic work for supporting partitioned tables in postgresql\n\nthese changes are associated with this pull request: https://github.com/rails/rails/pull/7573\nwhich were changes associated with rails 3.2.8.\n\nIf I were to sum up the work, it would be:\n\n* provide an instance method arel_table used for any operation that has access to the instance should use the instance method to acquire an arel_table associated with the current models attributes.\n* alter class method arel_table to handle parameters, with no parameters do original work -- with parameters associate the table with the specific partitioned table determined by key attributes\n* provide methods to manage key attributes and values (these are the fields the db table is partitioned on)\n* provide an instance method table_name which calls the altered class method table_name which now takes attribute values that should determine the specific partitioned table to name\n* bunch of helper methods in postgresql connection area associated with schema management. this is for reasons 1) create_schema seems like a useful method, 2) adding foreign key is needed because in postgres child partitions need to manage the foreign key references, 3) some sequence method changes to support tables in non-public (well non search path) schema: this is probably generally useful work as rails seems broken about non-public schemas\n* change any self.class.arel_table to self.arel_table\n* create is a little weird because it needs to acquire the primary key if it isn't supplied (for instance ID where your need to fetch from the sequence -- for this work to be complete we need to supply the model instance method \"prefetch_primary_key?\" instead of it being on connection since prefetching isn't needed for any tables that aren't partitioned by a primary key)\n* some helper methods for finds (from_partition(*x)) which we've found useful in our day to day coding. this method just sets the table name (this is useful because find from the parent table even when partition keys are provided can take an inordinate time if the number of child tables is large -- so specifying the specific child table is useful).\n\nthe rest of the code to support partitioning is here: https://github.com/fiksu/partitioned/tree/rails-3-2-8-patching -- you'll need to pull from that branch (which doesn't try to patch rails -- so use it with this pull request). the master branch patches rails 3.2.8 correctly -- you can use it on your own. The current rubygem of partitioned patches rails in a different (and more conservative way) -- I don't think you should look at that code.\n\nYou could probably remove a bunch of stuff to make this code faster for the common non-partitioned case.\n\n* instance arel_table could just call class method arel_table\n* self.class.arel_table could just do the old work\n* instance table_name could just call class method table_name which did just the old work\n\nthen one might provide fixups for those methods for models where partitioning is desired.\n\nI think the ugliest part of this code is update -- although I haven't walked down this path, it would seem the best way to manage this would be to add a hook to attribute modifications and fix up the all arel_tables that the attributes point to if the partitioned key values changes\n\nI'm willing to help in any way that makes sense to support partitioning in a future rails version.\n",
|
204
|
+
"milestone": null,
|
205
|
+
"labels": [
|
206
|
+
{
|
207
|
+
"name": "activerecord",
|
208
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
209
|
+
"color": "0b02e1"
|
210
|
+
}
|
211
|
+
],
|
212
|
+
"user": {
|
213
|
+
"gravatar_id": "f23c30d03f27dac9a573ada974726cc4",
|
214
|
+
"avatar_url": "https://secure.gravatar.com/avatar/f23c30d03f27dac9a573ada974726cc4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
215
|
+
"login": "keithgabryelski",
|
216
|
+
"url": "https://api.github.com/users/keithgabryelski",
|
217
|
+
"id": 884378
|
218
|
+
},
|
219
|
+
"closed_at": null,
|
220
|
+
"created_at": "2012-09-10T02:29:33Z",
|
221
|
+
"comments": 0,
|
222
|
+
"title": "partitioning updates working",
|
223
|
+
"state": "open",
|
224
|
+
"pull_request": {
|
225
|
+
"patch_url": "https://github.com/rails/rails/pull/7584.patch",
|
226
|
+
"html_url": "https://github.com/rails/rails/pull/7584",
|
227
|
+
"diff_url": "https://github.com/rails/rails/pull/7584.diff"
|
228
|
+
},
|
229
|
+
"number": 7584,
|
230
|
+
"html_url": "https://github.com/rails/rails/issues/7584",
|
231
|
+
"updated_at": "2012-09-10T02:29:33Z",
|
232
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7584",
|
233
|
+
"assignee": null,
|
234
|
+
"id": 6752275
|
235
|
+
},
|
236
|
+
{
|
237
|
+
"body": "My rails 3.2 app is trying to fetch values from the cache (memcached via dalli) that I'm not expecting it to be caching. It's not getting any cache hits, but I'm puzzled about what is going on. This happens with `config.action_controller.perform_caching = true` on production as well as development, using WEBrick.\n\nHere's a snippet of what I'm seeing in memcache verbose output:\n\n <30 GET https://www.myrailsapp.com/?\n >30 Writing an error: Not found\n >30 Writing bin response:\n >30 0x81 0x00 0x00 0x00\n >30 0x00 0x00 0x00 0x01\n >30 0x00 0x00 0x00 0x09\n >30 0x00 0x00 0x00 0x00\n >30 0x00 0x00 0x00 0x00\n >30 0x00 0x00 0x00 0x00\n <30 Read binary protocol data:\n <30 0x80 0x00 0x00 0xd0\n <30 0x00 0x00 0x00 0x00\n <30 0x00 0x00 0x00 0xd0\n <30 0x00 0x00 0x00 0x00\n <30 0x00 0x00 0x00 0x00\n <30 0x00 0x00 0x00 0x00\n\nNote that there is only a cache GET and I'm not seeing any cache writes.\n\nI see similar cache GET attempts for all my actions, most of which are JSON API calls. All of them result in a cache miss. Like this,\n\n <31 GET https://www.myrailsapp.com/api/somecall?param1=foo¶m2=bar\n >31 Writing an error: Not found\n\nI have not specified any `caches_action` directives anywhere in my app.\n\nIs this a rails bug? \n\nIf no, where should I look to stop these unnecessary cache GETs?\n\n\n \n\n ",
|
238
|
+
"milestone": null,
|
239
|
+
"labels": [
|
240
|
+
{
|
241
|
+
"name": "needs feedback",
|
242
|
+
"url": "https://api.github.com/repos/rails/rails/labels/needs+feedback",
|
243
|
+
"color": "ededed"
|
244
|
+
}
|
245
|
+
],
|
246
|
+
"user": {
|
247
|
+
"gravatar_id": "5c0b963a5d80a4bef067204dc1149881",
|
248
|
+
"avatar_url": "https://secure.gravatar.com/avatar/5c0b963a5d80a4bef067204dc1149881?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
249
|
+
"login": "shyam-habarakada",
|
250
|
+
"url": "https://api.github.com/users/shyam-habarakada",
|
251
|
+
"id": 601660
|
252
|
+
},
|
253
|
+
"closed_at": null,
|
254
|
+
"created_at": "2012-09-09T17:18:48Z",
|
255
|
+
"comments": 5,
|
256
|
+
"title": "Unexpected (and failing) cache GETs ",
|
257
|
+
"state": "open",
|
258
|
+
"pull_request": {
|
259
|
+
"patch_url": null,
|
260
|
+
"html_url": null,
|
261
|
+
"diff_url": null
|
262
|
+
},
|
263
|
+
"number": 7581,
|
264
|
+
"html_url": "https://github.com/rails/rails/issues/7581",
|
265
|
+
"updated_at": "2012-09-09T20:50:55Z",
|
266
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7581",
|
267
|
+
"assignee": null,
|
268
|
+
"id": 6747349
|
269
|
+
},
|
270
|
+
{
|
271
|
+
"body": "This method return @attribute[name].serialized or read_attribute().\nThis patch allows to return @attributes[name] if it is already typecasted.",
|
272
|
+
"milestone": null,
|
273
|
+
"labels": [
|
274
|
+
{
|
275
|
+
"name": "activerecord",
|
276
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
277
|
+
"color": "0b02e1"
|
278
|
+
}
|
279
|
+
],
|
280
|
+
"user": {
|
281
|
+
"gravatar_id": "0cd98f4e263d306bc455ca750c31443f",
|
282
|
+
"avatar_url": "https://secure.gravatar.com/avatar/0cd98f4e263d306bc455ca750c31443f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
283
|
+
"login": "acapilleri",
|
284
|
+
"url": "https://api.github.com/users/acapilleri",
|
285
|
+
"id": 46208
|
286
|
+
},
|
287
|
+
"closed_at": null,
|
288
|
+
"created_at": "2012-09-08T22:23:45Z",
|
289
|
+
"comments": 1,
|
290
|
+
"title": "typecastes_attribute_value could return @attributes[name]",
|
291
|
+
"state": "open",
|
292
|
+
"pull_request": {
|
293
|
+
"patch_url": "https://github.com/rails/rails/pull/7579.patch",
|
294
|
+
"html_url": "https://github.com/rails/rails/pull/7579",
|
295
|
+
"diff_url": "https://github.com/rails/rails/pull/7579.diff"
|
296
|
+
},
|
297
|
+
"number": 7579,
|
298
|
+
"html_url": "https://github.com/rails/rails/issues/7579",
|
299
|
+
"updated_at": "2012-09-08T23:38:51Z",
|
300
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7579",
|
301
|
+
"assignee": null,
|
302
|
+
"id": 6738280
|
303
|
+
},
|
304
|
+
{
|
305
|
+
"body": "I did this refactoring out of the discussion in #7518. I think it's better to have a minimal amount of duplication between the database adapters. Every adapter should define it's own column mappings and not delegate to a global superclass, which has some knowledge of the different database vendors.\n\nThis make the mappings simpler because we just need to care about the datatypes of one vendor and it allows us to issue warnings when unsupported datatypes are detected.",
|
306
|
+
"milestone": null,
|
307
|
+
"labels": [
|
308
|
+
{
|
309
|
+
"name": "activerecord",
|
310
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
311
|
+
"color": "0b02e1"
|
312
|
+
}
|
313
|
+
],
|
314
|
+
"user": {
|
315
|
+
"gravatar_id": "3d698e2872c07061a455d9e250861235",
|
316
|
+
"avatar_url": "https://secure.gravatar.com/avatar/3d698e2872c07061a455d9e250861235?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
317
|
+
"login": "senny",
|
318
|
+
"url": "https://api.github.com/users/senny",
|
319
|
+
"id": 5402
|
320
|
+
},
|
321
|
+
"closed_at": null,
|
322
|
+
"created_at": "2012-09-08T17:10:05Z",
|
323
|
+
"comments": 2,
|
324
|
+
"title": "refactoring: isolate sql-datatype mapping in postgres adapter",
|
325
|
+
"state": "open",
|
326
|
+
"pull_request": {
|
327
|
+
"patch_url": "https://github.com/rails/rails/pull/7575.patch",
|
328
|
+
"html_url": "https://github.com/rails/rails/pull/7575",
|
329
|
+
"diff_url": "https://github.com/rails/rails/pull/7575.diff"
|
330
|
+
},
|
331
|
+
"number": 7575,
|
332
|
+
"html_url": "https://github.com/rails/rails/issues/7575",
|
333
|
+
"updated_at": "2012-09-08T17:32:09Z",
|
334
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7575",
|
335
|
+
"assignee": null,
|
336
|
+
"id": 6733661
|
337
|
+
},
|
338
|
+
{
|
339
|
+
"body": "Aaron,\n\nYou asked for a pull request with the changes to make activerecord dynamically determine a model's table name such that it can support database table partitioning.\n\nAt the time, I was pretty incompetent with git and github -- I've adjusted and hope I'm doing this first pull request correctly.\n\nHere is a branch of the partitioning code which has been modified to work with this pull request.\n\nhttps://github.com/fiksu/partitioned/tree/rails-3-2-8-patching\n\nI've created a repo with examples of different types of partitioning.\n\nhttps://github.com/keithgabryelski/partitioned_examples\n\nexamples are in app/models and can be run like this:\n\n $ cd partitioned_examples\n $ rails runner app/models/company_id.rb --force\n",
|
340
|
+
"milestone": null,
|
341
|
+
"labels": [
|
342
|
+
{
|
343
|
+
"name": "activerecord",
|
344
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
345
|
+
"color": "0b02e1"
|
346
|
+
},
|
347
|
+
{
|
348
|
+
"name": "3-2-stable",
|
349
|
+
"url": "https://api.github.com/repos/rails/rails/labels/3-2-stable",
|
350
|
+
"color": "02d7e1"
|
351
|
+
}
|
352
|
+
],
|
353
|
+
"user": {
|
354
|
+
"gravatar_id": "f23c30d03f27dac9a573ada974726cc4",
|
355
|
+
"avatar_url": "https://secure.gravatar.com/avatar/f23c30d03f27dac9a573ada974726cc4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
356
|
+
"login": "keithgabryelski",
|
357
|
+
"url": "https://api.github.com/users/keithgabryelski",
|
358
|
+
"id": 884378
|
359
|
+
},
|
360
|
+
"closed_at": null,
|
361
|
+
"created_at": "2012-09-08T14:53:32Z",
|
362
|
+
"comments": 2,
|
363
|
+
"title": "Partitioned",
|
364
|
+
"state": "open",
|
365
|
+
"pull_request": {
|
366
|
+
"patch_url": "https://github.com/rails/rails/pull/7573.patch",
|
367
|
+
"html_url": "https://github.com/rails/rails/pull/7573",
|
368
|
+
"diff_url": "https://github.com/rails/rails/pull/7573.diff"
|
369
|
+
},
|
370
|
+
"number": 7573,
|
371
|
+
"html_url": "https://github.com/rails/rails/issues/7573",
|
372
|
+
"updated_at": "2012-09-10T02:30:11Z",
|
373
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7573",
|
374
|
+
"assignee": null,
|
375
|
+
"id": 6731772
|
376
|
+
},
|
377
|
+
{
|
378
|
+
"body": "When investigating for #7564, I found potentially bug. In database.yml, we use not `charset` but `encoding`.",
|
379
|
+
"milestone": null,
|
380
|
+
"labels": [
|
381
|
+
{
|
382
|
+
"name": "activerecord",
|
383
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
384
|
+
"color": "0b02e1"
|
385
|
+
}
|
386
|
+
],
|
387
|
+
"user": {
|
388
|
+
"gravatar_id": "1f0b221851379759360d7130dabdfa53",
|
389
|
+
"avatar_url": "https://secure.gravatar.com/avatar/1f0b221851379759360d7130dabdfa53?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
390
|
+
"login": "kennyj",
|
391
|
+
"url": "https://api.github.com/users/kennyj",
|
392
|
+
"id": 13426
|
393
|
+
},
|
394
|
+
"closed_at": null,
|
395
|
+
"created_at": "2012-09-08T13:58:55Z",
|
396
|
+
"comments": 4,
|
397
|
+
"title": "Use configuration['encoding'], because database configuration use not charset but encoding.",
|
398
|
+
"state": "open",
|
399
|
+
"pull_request": {
|
400
|
+
"patch_url": "https://github.com/rails/rails/pull/7572.patch",
|
401
|
+
"html_url": "https://github.com/rails/rails/pull/7572",
|
402
|
+
"diff_url": "https://github.com/rails/rails/pull/7572.diff"
|
403
|
+
},
|
404
|
+
"number": 7572,
|
405
|
+
"html_url": "https://github.com/rails/rails/issues/7572",
|
406
|
+
"updated_at": "2012-09-10T16:54:02Z",
|
407
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7572",
|
408
|
+
"assignee": null,
|
409
|
+
"id": 6731422
|
410
|
+
},
|
411
|
+
{
|
412
|
+
"body": "force_ssl can accept options for redirect_to. like status for the http code to use for redirect",
|
413
|
+
"milestone": null,
|
414
|
+
"labels": [
|
415
|
+
{
|
416
|
+
"name": "actionpack",
|
417
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
418
|
+
"color": "FFF700"
|
419
|
+
}
|
420
|
+
],
|
421
|
+
"user": {
|
422
|
+
"gravatar_id": "cabe9e695419a4936d1635756272953b",
|
423
|
+
"avatar_url": "https://secure.gravatar.com/avatar/cabe9e695419a4936d1635756272953b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
424
|
+
"login": "deepak",
|
425
|
+
"url": "https://api.github.com/users/deepak",
|
426
|
+
"id": 9192
|
427
|
+
},
|
428
|
+
"closed_at": null,
|
429
|
+
"created_at": "2012-09-08T03:04:15Z",
|
430
|
+
"comments": 4,
|
431
|
+
"title": "ActionController::ForceSSL accepts options for redirect_to",
|
432
|
+
"state": "open",
|
433
|
+
"pull_request": {
|
434
|
+
"patch_url": "https://github.com/rails/rails/pull/7570.patch",
|
435
|
+
"html_url": "https://github.com/rails/rails/pull/7570",
|
436
|
+
"diff_url": "https://github.com/rails/rails/pull/7570.diff"
|
437
|
+
},
|
438
|
+
"number": 7570,
|
439
|
+
"html_url": "https://github.com/rails/rails/issues/7570",
|
440
|
+
"updated_at": "2012-09-09T04:57:44Z",
|
441
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7570",
|
442
|
+
"assignee": null,
|
443
|
+
"id": 6728537
|
444
|
+
},
|
445
|
+
{
|
446
|
+
"body": "Exception message was misleading, as it is possible to have a\npolymorphic 'has_many :through' join model.",
|
447
|
+
"milestone": null,
|
448
|
+
"labels": [
|
449
|
+
{
|
450
|
+
"name": "activerecord",
|
451
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
452
|
+
"color": "0b02e1"
|
453
|
+
}
|
454
|
+
],
|
455
|
+
"user": {
|
456
|
+
"gravatar_id": "0871a0fd6f3e1fd24538914ed4ecf332",
|
457
|
+
"avatar_url": "https://secure.gravatar.com/avatar/0871a0fd6f3e1fd24538914ed4ecf332?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
458
|
+
"login": "skorfmann",
|
459
|
+
"url": "https://api.github.com/users/skorfmann",
|
460
|
+
"id": 136789
|
461
|
+
},
|
462
|
+
"closed_at": null,
|
463
|
+
"created_at": "2012-09-07T23:14:07Z",
|
464
|
+
"comments": 5,
|
465
|
+
"title": "Improve exception message for HasManyThroughAssociationPolymorphicSource...",
|
466
|
+
"state": "open",
|
467
|
+
"pull_request": {
|
468
|
+
"patch_url": "https://github.com/rails/rails/pull/7569.patch",
|
469
|
+
"html_url": "https://github.com/rails/rails/pull/7569",
|
470
|
+
"diff_url": "https://github.com/rails/rails/pull/7569.diff"
|
471
|
+
},
|
472
|
+
"number": 7569,
|
473
|
+
"html_url": "https://github.com/rails/rails/issues/7569",
|
474
|
+
"updated_at": "2012-09-09T13:56:05Z",
|
475
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7569",
|
476
|
+
"assignee": null,
|
477
|
+
"id": 6726743
|
478
|
+
},
|
479
|
+
{
|
480
|
+
"body": "```ruby\nclass Report < ActiveRecord::Base\n belongs_to :user\n belongs_to :sale, touch: true\nend\n\nclass Sale < ActiveRecord::Base\n after_touch :print_to_screen\n def print_to_screen\n print \"teste\"\n end\nend\n```\nirb> allan = User.find(1)\nirb> sale = Sale.first\nirb> allan.report! sale\n\n*here I'm creating a new record on Report class, the after_touch is not being called, but if I...*\n\nirb> sale.touch\n\nSQL (1.2ms) UPDATE \"sales\" SET \"updated_at\" = '2012-09-07 19:28:49.777407' WHERE \"sales\".\"id\" = 1\nteste => true\n\n*the output from my after_touch method is called.*\n\n*the after_touch shouldn't be called from belongs_to association on Sale class?*\n\nUsing stable 3.2.8 Rails.\n",
|
481
|
+
"milestone": null,
|
482
|
+
"labels": [
|
483
|
+
{
|
484
|
+
"name": "activerecord",
|
485
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
486
|
+
"color": "0b02e1"
|
487
|
+
}
|
488
|
+
],
|
489
|
+
"user": {
|
490
|
+
"gravatar_id": "a05cd2d5dac30594cb768d79b032307a",
|
491
|
+
"avatar_url": "https://secure.gravatar.com/avatar/a05cd2d5dac30594cb768d79b032307a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
492
|
+
"login": "allangarcia",
|
493
|
+
"url": "https://api.github.com/users/allangarcia",
|
494
|
+
"id": 855106
|
495
|
+
},
|
496
|
+
"closed_at": null,
|
497
|
+
"created_at": "2012-09-07T19:40:06Z",
|
498
|
+
"comments": 1,
|
499
|
+
"title": "belongs_to touch:true not calling after_touch callback",
|
500
|
+
"state": "open",
|
501
|
+
"pull_request": {
|
502
|
+
"patch_url": null,
|
503
|
+
"html_url": null,
|
504
|
+
"diff_url": null
|
505
|
+
},
|
506
|
+
"number": 7567,
|
507
|
+
"html_url": "https://github.com/rails/rails/issues/7567",
|
508
|
+
"updated_at": "2012-09-08T19:51:36Z",
|
509
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7567",
|
510
|
+
"assignee": null,
|
511
|
+
"id": 6722528
|
512
|
+
},
|
513
|
+
{
|
514
|
+
"body": "This PR is related to #7525 , #6648 and #5547.\nWe should use mysqldump native command when dumping db structure.\n\ncc/ @rafaelfranca @seamusabshere",
|
515
|
+
"milestone": null,
|
516
|
+
"labels": [
|
517
|
+
{
|
518
|
+
"name": "activerecord",
|
519
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
520
|
+
"color": "0b02e1"
|
521
|
+
}
|
522
|
+
],
|
523
|
+
"user": {
|
524
|
+
"gravatar_id": "1f0b221851379759360d7130dabdfa53",
|
525
|
+
"avatar_url": "https://secure.gravatar.com/avatar/1f0b221851379759360d7130dabdfa53?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
526
|
+
"login": "kennyj",
|
527
|
+
"url": "https://api.github.com/users/kennyj",
|
528
|
+
"id": 13426
|
529
|
+
},
|
530
|
+
"closed_at": null,
|
531
|
+
"created_at": "2012-09-07T16:49:44Z",
|
532
|
+
"comments": 2,
|
533
|
+
"title": "Use mysqldump native commands when rake db:structure:dump.",
|
534
|
+
"state": "open",
|
535
|
+
"pull_request": {
|
536
|
+
"patch_url": "https://github.com/rails/rails/pull/7564.patch",
|
537
|
+
"html_url": "https://github.com/rails/rails/pull/7564",
|
538
|
+
"diff_url": "https://github.com/rails/rails/pull/7564.diff"
|
539
|
+
},
|
540
|
+
"number": 7564,
|
541
|
+
"html_url": "https://github.com/rails/rails/issues/7564",
|
542
|
+
"updated_at": "2012-09-08T12:59:26Z",
|
543
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7564",
|
544
|
+
"assignee": null,
|
545
|
+
"id": 6718793
|
546
|
+
},
|
547
|
+
{
|
548
|
+
"body": "I have covered pg_connection.distinct with tests and refactored it. I would also like to rebase this against 3-2-stable because master branch contains fix for #5868, I just cleaned up and made sure it works.",
|
549
|
+
"milestone": null,
|
550
|
+
"labels": [
|
551
|
+
{
|
552
|
+
"name": "activerecord",
|
553
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
554
|
+
"color": "0b02e1"
|
555
|
+
}
|
556
|
+
],
|
557
|
+
"user": {
|
558
|
+
"gravatar_id": "607564f1a15f1899c71b4a9fdfc33ac2",
|
559
|
+
"avatar_url": "https://secure.gravatar.com/avatar/607564f1a15f1899c71b4a9fdfc33ac2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
560
|
+
"login": "semaperepelitsa",
|
561
|
+
"url": "https://api.github.com/users/semaperepelitsa",
|
562
|
+
"id": 347921
|
563
|
+
},
|
564
|
+
"closed_at": null,
|
565
|
+
"created_at": "2012-09-07T16:36:50Z",
|
566
|
+
"comments": 3,
|
567
|
+
"title": "pg_connection.distinct refactoring",
|
568
|
+
"state": "open",
|
569
|
+
"pull_request": {
|
570
|
+
"patch_url": "https://github.com/rails/rails/pull/7562.patch",
|
571
|
+
"html_url": "https://github.com/rails/rails/pull/7562",
|
572
|
+
"diff_url": "https://github.com/rails/rails/pull/7562.diff"
|
573
|
+
},
|
574
|
+
"number": 7562,
|
575
|
+
"html_url": "https://github.com/rails/rails/issues/7562",
|
576
|
+
"updated_at": "2012-09-07T17:30:03Z",
|
577
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7562",
|
578
|
+
"assignee": null,
|
579
|
+
"id": 6718487
|
580
|
+
},
|
581
|
+
{
|
582
|
+
"body": "See #7559",
|
583
|
+
"milestone": null,
|
584
|
+
"labels": [
|
585
|
+
{
|
586
|
+
"name": "actionpack",
|
587
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
588
|
+
"color": "FFF700"
|
589
|
+
}
|
590
|
+
],
|
591
|
+
"user": {
|
592
|
+
"gravatar_id": "144314100b686db946ff68c7ae1065d1",
|
593
|
+
"avatar_url": "https://secure.gravatar.com/avatar/144314100b686db946ff68c7ae1065d1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
594
|
+
"login": "NARKOZ",
|
595
|
+
"url": "https://api.github.com/users/NARKOZ",
|
596
|
+
"id": 253398
|
597
|
+
},
|
598
|
+
"closed_at": null,
|
599
|
+
"created_at": "2012-09-07T12:42:22Z",
|
600
|
+
"comments": 1,
|
601
|
+
"title": "image_path should return blank string if empty source is passed",
|
602
|
+
"state": "open",
|
603
|
+
"pull_request": {
|
604
|
+
"patch_url": "https://github.com/rails/rails/pull/7561.patch",
|
605
|
+
"html_url": "https://github.com/rails/rails/pull/7561",
|
606
|
+
"diff_url": "https://github.com/rails/rails/pull/7561.diff"
|
607
|
+
},
|
608
|
+
"number": 7561,
|
609
|
+
"html_url": "https://github.com/rails/rails/issues/7561",
|
610
|
+
"updated_at": "2012-09-07T14:14:21Z",
|
611
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7561",
|
612
|
+
"assignee": null,
|
613
|
+
"id": 6713116
|
614
|
+
},
|
615
|
+
{
|
616
|
+
"body": "Greetings!\n\nIn an attempt to send a POST request with JSON data with HTTP header \"Transfer-Encoding: Chunked\" from a client to the server I encountered that the Parameters hash always evaluates to empty.\n\nLooking where the request is handled in the middleware, the reason for this becomes quickly clear:\n\nIn file [params_parser.rb](https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/params_parser.rb):\n\n```Ruby\n def parse_formatted_parameters(env)\n request = Request.new(env)\n\n return false if request.content_length.zero?\n ...\n```\n\nIf the request is send with header \"Transfer-Encoding: Chunked\" there is no header \"Content-Length\". Nonetheless, there is a io stream which possibly contains data.\n\nIs there a compelling reason for parsing the body data that requires that there is a content length? \n\n(I've looked into the sources for the JSON parsers, and it doesn't seem so.)\n\nOn my local system to test a possible fix I changed the line \n```Ruby\n return false if request.content_length.zero?\n```\nto\n```Ruby\n return false if request.content_length.zero? && !(request.headers[\"Transfer-Encoding\"].downcase.include? == \"chunked\")\n```\n\nand it worked for my limited tests sending a POST request with JSON data and header \"Transfer-Encoding: Chunked\" from a client. \n\nNote: I'm not a Rails developer, and does not have a development environment yet. The workaround above has probably a better solution.\n\nI'm using Rails primarily for testing clients, currently using WEBrick for development.\n \n\nI would appreciate it if someone could comment this! :)\n\nThanks in advance!\n\nAndreas",
|
617
|
+
"milestone": null,
|
618
|
+
"labels": [
|
619
|
+
{
|
620
|
+
"name": "actionpack",
|
621
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
622
|
+
"color": "FFF700"
|
623
|
+
}
|
624
|
+
],
|
625
|
+
"user": {
|
626
|
+
"gravatar_id": "77d853f4baf08e8fea1bcf5d406a656e",
|
627
|
+
"avatar_url": "https://secure.gravatar.com/avatar/77d853f4baf08e8fea1bcf5d406a656e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
628
|
+
"login": "couchdeveloper",
|
629
|
+
"url": "https://api.github.com/users/couchdeveloper",
|
630
|
+
"id": 1564701
|
631
|
+
},
|
632
|
+
"closed_at": null,
|
633
|
+
"created_at": "2012-09-07T10:13:13Z",
|
634
|
+
"comments": 2,
|
635
|
+
"title": "POST Request Body Ignored For Chunked Transfer-Encoding",
|
636
|
+
"state": "open",
|
637
|
+
"pull_request": {
|
638
|
+
"patch_url": null,
|
639
|
+
"html_url": null,
|
640
|
+
"diff_url": null
|
641
|
+
},
|
642
|
+
"number": 7556,
|
643
|
+
"html_url": "https://github.com/rails/rails/issues/7556",
|
644
|
+
"updated_at": "2012-09-08T15:59:14Z",
|
645
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7556",
|
646
|
+
"assignee": null,
|
647
|
+
"id": 6710676
|
648
|
+
},
|
649
|
+
{
|
650
|
+
"body": "Currently I can suppress generating routing helpers for a route using like this:\n\n```ruby\nmatch \"foo\" => 'foo#bar', :as => nil\n```\n\nBut it doesn't work if I move the `as` option to a scope:\n\n```ruby\nscope :as => nil do\n match \"foo\" => 'foo#bar'\nend\n```\nIt's not a huge deal but it would be nice to get it fixed for completeness and consistency.\n\nI'm using Rails 3.2.8.",
|
651
|
+
"milestone": null,
|
652
|
+
"labels": [
|
653
|
+
{
|
654
|
+
"name": "actionpack",
|
655
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
656
|
+
"color": "FFF700"
|
657
|
+
}
|
658
|
+
],
|
659
|
+
"user": {
|
660
|
+
"gravatar_id": "0f54ef970075176c916a04dfbe45a31c",
|
661
|
+
"avatar_url": "https://secure.gravatar.com/avatar/0f54ef970075176c916a04dfbe45a31c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
662
|
+
"login": "jacob-carlborg",
|
663
|
+
"url": "https://api.github.com/users/jacob-carlborg",
|
664
|
+
"id": 306980
|
665
|
+
},
|
666
|
+
"closed_at": null,
|
667
|
+
"created_at": "2012-09-07T08:57:08Z",
|
668
|
+
"comments": 0,
|
669
|
+
"title": "Suppress generating routing helpers with scope",
|
670
|
+
"state": "open",
|
671
|
+
"pull_request": {
|
672
|
+
"patch_url": null,
|
673
|
+
"html_url": null,
|
674
|
+
"diff_url": null
|
675
|
+
},
|
676
|
+
"number": 7555,
|
677
|
+
"html_url": "https://github.com/rails/rails/issues/7555",
|
678
|
+
"updated_at": "2012-09-07T08:57:08Z",
|
679
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7555",
|
680
|
+
"assignee": null,
|
681
|
+
"id": 6709378
|
682
|
+
},
|
683
|
+
{
|
684
|
+
"body": "If I have a route that looks like this:\n\n````ruby\nscope \"/:locale\" do\n match \"foo/bar\"\nend\n```\n\nAnd run `rake routes`, this is the output:\n\n foo_bar /:locale/foo/bar(.:format) :locale/foo#bar\n\nI would expect the following output:\n\n foo_bar /:locale/foo/bar(.:format) foo#bar\n\nIt prepends the scope to the controller. When I test to access the route I get the following error:\n\n wrong constant name :locale\n\nI'm using Rails 3.2.8",
|
685
|
+
"milestone": null,
|
686
|
+
"labels": [
|
687
|
+
{
|
688
|
+
"name": "actionpack",
|
689
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
690
|
+
"color": "FFF700"
|
691
|
+
}
|
692
|
+
],
|
693
|
+
"user": {
|
694
|
+
"gravatar_id": "0f54ef970075176c916a04dfbe45a31c",
|
695
|
+
"avatar_url": "https://secure.gravatar.com/avatar/0f54ef970075176c916a04dfbe45a31c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
696
|
+
"login": "jacob-carlborg",
|
697
|
+
"url": "https://api.github.com/users/jacob-carlborg",
|
698
|
+
"id": 306980
|
699
|
+
},
|
700
|
+
"closed_at": null,
|
701
|
+
"created_at": "2012-09-07T08:24:18Z",
|
702
|
+
"comments": 0,
|
703
|
+
"title": "Combining scoped routes and match shorthand doesn't work",
|
704
|
+
"state": "open",
|
705
|
+
"pull_request": {
|
706
|
+
"patch_url": null,
|
707
|
+
"html_url": null,
|
708
|
+
"diff_url": null
|
709
|
+
},
|
710
|
+
"number": 7554,
|
711
|
+
"html_url": "https://github.com/rails/rails/issues/7554",
|
712
|
+
"updated_at": "2012-09-07T08:24:18Z",
|
713
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7554",
|
714
|
+
"assignee": null,
|
715
|
+
"id": 6708869
|
716
|
+
},
|
717
|
+
{
|
718
|
+
"body": "I'm using Rails 3.2.3 with Postgres 8.4.13. I need two arrays of field values. So I build a relation that `select`s the two fields I need, then I try to `pluck` each field into an array. Here's an example using two records (note that the ids are uuids):\n\n Loading development environment (Rails 3.2.3)\n :001 > ids = [\"6cfb7658-f856-11e1-a200-01399cfcf73f\", \"8efa2cf4-f856-11e1-9c5d-01399cfdd60a\"]\n => [\"6cfb7658-f856-11e1-a200-01399cfcf73f\", \"8efa2cf4-f856-11e1-9c5d-01399cfdd60a\"] \n :002 > messages = Message.select([\"id\",\"sender_message_id\"]).where(:id => ids)\n Message Load (1.3ms) SELECT id, sender_message_id FROM \"messages\" WHERE \"messages\".\"id\" \n IN ('6cfb7658-f856-11e1-a200-01399cfcf73f', '8efa2cf4-f856-11e1-9c5d-01399cfdd60a')\n => [#<Message id: \"6cfb7658-f856-11e1-a200-01399cfcf73f\", sender_message_id: \"6cd60ed6-f856-11e1-8cae-01399cfcf64a\">,\n #<Message id: \"8efa2cf4-f856-11e1-9c5d-01399cfdd60a\", sender_message_id: \"8ef25556-f856-11e1-81bf-01399cfdd5d6\">] \n :003 > messages.pluck(\"id\")\n (0.7ms) SELECT id, sender_message_id FROM \"messages\" \n WHERE \"messages\".\"id\" IN ('6cfb7658-f856-11e1-a200-01399cfcf73f', '8efa2cf4-f856-11e1-9c5d-01399cfdd60a')\n => [\"6cfb7658-f856-11e1-a200-01399cfcf73f\", \"8efa2cf4-f856-11e1-9c5d-01399cfdd60a\"] \n :004 > messages.pluck(\"sender_message_id\")\n (0.6ms) SELECT id, sender_message_id FROM \"messages\" \n WHERE \"messages\".\"id\" IN ('6cfb7658-f856-11e1-a200-01399cfcf73f', '8efa2cf4-f856-11e1-9c5d-01399cfdd60a')\n => [\"6cfb7658-f856-11e1-a200-01399cfcf73f\", \"8efa2cf4-f856-11e1-9c5d-01399cfdd60a\"]\n\nApparently the relation's `select` is taking precedence over `pluck`, so SQL always does `SELECT id, sender_message_id`, even though `pluck` only needs one field. And` pluck` just makes an array of the first column returned, so the second result above is wrong.\n\nIf I leave the `select` clause out of the relation, the `pluck`s provide the `SELECT` column and the correct values are returned: \n\n :005 > messages = Message.where(:id => ids)\n Message Load (1.0ms) SELECT \"messages\".* FROM \"messages\" WHERE \"messages\".\"id\" \n IN ('6cfb7658-f856-11e1-a200-01399cfcf73f', '8efa2cf4-f856-11e1-9c5d-01399cfdd60a')\n => [...full list of attributes for two messages...] \n :006 > messages.pluck(\"id\")\n (2.4ms) SELECT id FROM \"messages\" \n WHERE \"messages\".\"id\" IN ('6cfb7658-f856-11e1-a200-01399cfcf73f', '8efa2cf4-f856-11e1-9c5d-01399cfdd60a')\n => [\"6cfb7658-f856-11e1-a200-01399cfcf73f\", \"8efa2cf4-f856-11e1-9c5d-01399cfdd60a\"] \n :007 > messages.pluck(\"sender_message_id\")\n (0.7ms) SELECT sender_message_id FROM \"messages\" \n WHERE \"messages\".\"id\" IN ('6cfb7658-f856-11e1-a200-01399cfcf73f', '8efa2cf4-f856-11e1-9c5d-01399cfdd60a')\n => [\"6cd60ed6-f856-11e1-8cae-01399cfcf64a\", \"8ef25556-f856-11e1-81bf-01399cfdd5d6\"] \n\nI expected `pluck` to return the correct column as long as the `pluck` column is one of the columns in the relation.",
|
719
|
+
"milestone": null,
|
720
|
+
"labels": [
|
721
|
+
{
|
722
|
+
"name": "activerecord",
|
723
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
724
|
+
"color": "0b02e1"
|
725
|
+
}
|
726
|
+
],
|
727
|
+
"user": {
|
728
|
+
"gravatar_id": "0f292492ebf8c8001971f9922e3070fb",
|
729
|
+
"avatar_url": "https://secure.gravatar.com/avatar/0f292492ebf8c8001971f9922e3070fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
730
|
+
"login": "mcbsys",
|
731
|
+
"url": "https://api.github.com/users/mcbsys",
|
732
|
+
"id": 865498
|
733
|
+
},
|
734
|
+
"closed_at": null,
|
735
|
+
"created_at": "2012-09-06T22:42:20Z",
|
736
|
+
"comments": 2,
|
737
|
+
"title": "Pluck may return wrong column if ActiveRecord relation has a select clause",
|
738
|
+
"state": "open",
|
739
|
+
"pull_request": {
|
740
|
+
"patch_url": null,
|
741
|
+
"html_url": null,
|
742
|
+
"diff_url": null
|
743
|
+
},
|
744
|
+
"number": 7551,
|
745
|
+
"html_url": "https://github.com/rails/rails/issues/7551",
|
746
|
+
"updated_at": "2012-09-06T23:17:48Z",
|
747
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7551",
|
748
|
+
"assignee": null,
|
749
|
+
"id": 6701905
|
750
|
+
},
|
751
|
+
{
|
752
|
+
"body": "PostgreSQL array type support. Any datatype can be used to create an array column, with full migration and schema dumper support.\n\nTo declare an array column, use the following syntax:\n\n```ruby\ncreate_table :table_with_arrays do |t|\n t.integer :int_array, :array => true\n # integer[]\n t.integer :int_array, :array => true, :length => 2\n # smallint[]\n t.string :string_array, :array => true, :length => 30\n # char varying(30)[]\nend \n```\n\nThis respects any other migraion detail (limits, defaults, etc). ActiveRecord will serialize and deserialize the array columns on their way to and from the database.\n\nOne thing to note: PostgreSQL does not enforce any limits on the number of elements, and any array can be multi-dimensional. Any array that is multi-dimensional must be rectangular (each sub array must have the same number of elements as its siblings).\n\nI can squash this commit after review",
|
753
|
+
"milestone": null,
|
754
|
+
"labels": [
|
755
|
+
{
|
756
|
+
"name": "activerecord",
|
757
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
758
|
+
"color": "0b02e1"
|
759
|
+
}
|
760
|
+
],
|
761
|
+
"user": {
|
762
|
+
"gravatar_id": "f0ffef353c38dc2ee7e10ef36c3ffa5b",
|
763
|
+
"avatar_url": "https://secure.gravatar.com/avatar/f0ffef353c38dc2ee7e10ef36c3ffa5b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
764
|
+
"login": "danmcclain",
|
765
|
+
"url": "https://api.github.com/users/danmcclain",
|
766
|
+
"id": 144138
|
767
|
+
},
|
768
|
+
"closed_at": null,
|
769
|
+
"created_at": "2012-09-06T18:35:47Z",
|
770
|
+
"comments": 14,
|
771
|
+
"title": "Adds migration and type casting support for PostgreSQL Array datatype",
|
772
|
+
"state": "open",
|
773
|
+
"pull_request": {
|
774
|
+
"patch_url": "https://github.com/rails/rails/pull/7547.patch",
|
775
|
+
"html_url": "https://github.com/rails/rails/pull/7547",
|
776
|
+
"diff_url": "https://github.com/rails/rails/pull/7547.diff"
|
777
|
+
},
|
778
|
+
"number": 7547,
|
779
|
+
"html_url": "https://github.com/rails/rails/issues/7547",
|
780
|
+
"updated_at": "2012-09-09T20:33:42Z",
|
781
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7547",
|
782
|
+
"assignee": null,
|
783
|
+
"id": 6695963
|
784
|
+
},
|
785
|
+
{
|
786
|
+
"body": "Only run EXPLAIN for statements that are supported. Really fixes Issue #5430.",
|
787
|
+
"milestone": null,
|
788
|
+
"labels": [
|
789
|
+
{
|
790
|
+
"name": "activerecord",
|
791
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
792
|
+
"color": "0b02e1"
|
793
|
+
}
|
794
|
+
],
|
795
|
+
"user": {
|
796
|
+
"gravatar_id": "139de3f8c3d6ee008cdb3abd3da23908",
|
797
|
+
"avatar_url": "https://secure.gravatar.com/avatar/139de3f8c3d6ee008cdb3abd3da23908?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
798
|
+
"login": "dlee",
|
799
|
+
"url": "https://api.github.com/users/dlee",
|
800
|
+
"id": 7035
|
801
|
+
},
|
802
|
+
"closed_at": null,
|
803
|
+
"created_at": "2012-09-06T15:10:33Z",
|
804
|
+
"comments": 4,
|
805
|
+
"title": "Don't EXPLAIN the unexplainable in postgresql",
|
806
|
+
"state": "open",
|
807
|
+
"pull_request": {
|
808
|
+
"patch_url": "https://github.com/rails/rails/pull/7544.patch",
|
809
|
+
"html_url": "https://github.com/rails/rails/pull/7544",
|
810
|
+
"diff_url": "https://github.com/rails/rails/pull/7544.diff"
|
811
|
+
},
|
812
|
+
"number": 7544,
|
813
|
+
"html_url": "https://github.com/rails/rails/issues/7544",
|
814
|
+
"updated_at": "2012-09-06T18:48:39Z",
|
815
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7544",
|
816
|
+
"assignee": null,
|
817
|
+
"id": 6690483
|
818
|
+
},
|
819
|
+
{
|
820
|
+
"body": "Rails will store the name of a child class in the database to use for re-instantiating the record as the correct class later. By specifying an `inheritance_serializer` and `inheritance_deserializer`, you can customize the stored identifier.\n\nThis is primarily useful for working with legacy data models.\n\n```ruby\nclass Foo < ActiveRecord::Base\n self.inheritance_serializer = ->(klass) do\n # Map the class to the appropriate type identifier.\n # Defaults to `klass.name`.\n if klass == Child1\n 1\n elsif klass == Child2\n 2\n end\n end\n\n self.inheritance_deserializer = ->(type_before_cast) do\n # Map the type identifier back into the appropriate class.\n # Defaults (approximately) to `type_before_cast.constantize`.\n case type_before_cast.to_i\n when 1\n Child1\n when 2\n Child2\n end\n end\nend\n\nclass Child1 < Foo; end\nclass Child2 < Foo; end\n```",
|
821
|
+
"milestone": null,
|
822
|
+
"labels": [
|
823
|
+
{
|
824
|
+
"name": "activerecord",
|
825
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
826
|
+
"color": "0b02e1"
|
827
|
+
}
|
828
|
+
],
|
829
|
+
"user": {
|
830
|
+
"gravatar_id": "b7af2fda045de32a35c281ec2f29b21b",
|
831
|
+
"avatar_url": "https://secure.gravatar.com/avatar/b7af2fda045de32a35c281ec2f29b21b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
832
|
+
"login": "pivotalcommon",
|
833
|
+
"url": "https://api.github.com/users/pivotalcommon",
|
834
|
+
"id": 130711
|
835
|
+
},
|
836
|
+
"closed_at": null,
|
837
|
+
"created_at": "2012-09-06T13:55:59Z",
|
838
|
+
"comments": 3,
|
839
|
+
"title": "Added customizable STI type serialization.",
|
840
|
+
"state": "open",
|
841
|
+
"pull_request": {
|
842
|
+
"patch_url": "https://github.com/rails/rails/pull/7541.patch",
|
843
|
+
"html_url": "https://github.com/rails/rails/pull/7541",
|
844
|
+
"diff_url": "https://github.com/rails/rails/pull/7541.diff"
|
845
|
+
},
|
846
|
+
"number": 7541,
|
847
|
+
"html_url": "https://github.com/rails/rails/issues/7541",
|
848
|
+
"updated_at": "2012-09-07T21:33:55Z",
|
849
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7541",
|
850
|
+
"assignee": null,
|
851
|
+
"id": 6688433
|
852
|
+
},
|
853
|
+
{
|
854
|
+
"body": "I have an ordinary helper module that has a method, where part of it's implementation calls the #asset_path helper. This works fine. \n\nI have an ActionView::TestCase that tests/calls this helper. This generally works fine, unless it tries to call the helper method that calls asset_path. \n\nI get a:\n\n\n undefined method `asset_path' for #<BentoSearchHelperTest:0x0000000f9aefc0>\n .../actionpack-3.2.8/lib/action_dispatch/testing/assertions/routing.rb:176:in `method_missing'\n ..../actionpack-3.2.8/lib/action_view/test_case.rb:236:in `method_missing'\n\nAs you can see I'm using rails 3.2.8. \n\nI believe this is a bug. But correct me if I'm wrong and I'm doing something wrong or something. ",
|
855
|
+
"milestone": null,
|
856
|
+
"labels": [
|
857
|
+
{
|
858
|
+
"name": "actionview",
|
859
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionview",
|
860
|
+
"color": "d7e102"
|
861
|
+
}
|
862
|
+
],
|
863
|
+
"user": {
|
864
|
+
"gravatar_id": "6a13e655e637138f8d571cec3f9cea76",
|
865
|
+
"avatar_url": "https://secure.gravatar.com/avatar/6a13e655e637138f8d571cec3f9cea76?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
866
|
+
"login": "jrochkind",
|
867
|
+
"url": "https://api.github.com/users/jrochkind",
|
868
|
+
"id": 149304
|
869
|
+
},
|
870
|
+
"closed_at": null,
|
871
|
+
"created_at": "2012-09-05T19:50:06Z",
|
872
|
+
"comments": 0,
|
873
|
+
"title": "ActionView::TestCase, helper that uses asset_path",
|
874
|
+
"state": "open",
|
875
|
+
"pull_request": {
|
876
|
+
"patch_url": null,
|
877
|
+
"html_url": null,
|
878
|
+
"diff_url": null
|
879
|
+
},
|
880
|
+
"number": 7534,
|
881
|
+
"html_url": "https://github.com/rails/rails/issues/7534",
|
882
|
+
"updated_at": "2012-09-05T19:50:36Z",
|
883
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7534",
|
884
|
+
"assignee": null,
|
885
|
+
"id": 6671205
|
886
|
+
},
|
887
|
+
{
|
888
|
+
"body": "I have a route:\n\n```\nconstraints subdomain: \"images\" do\n match \"/:id(/:geometry)\" => \"images#show\"\nend\n```\n\nAnd a controller:\n\n```\nclass ImagesController < ActionController::Base\n\n force_ssl if Rails.env.production?\n\n def show\n # ...\n end\n\nend\n```\n\nIf I go to: http://images.domain.dev/42/300x400?some=params\nI get redirected to: https://images.domain.dev/42?some=params",
|
889
|
+
"milestone": null,
|
890
|
+
"labels": [
|
891
|
+
{
|
892
|
+
"name": "actionpack",
|
893
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
894
|
+
"color": "FFF700"
|
895
|
+
}
|
896
|
+
],
|
897
|
+
"user": {
|
898
|
+
"gravatar_id": "5539fccd965e1b19e6c8b714b41d929e",
|
899
|
+
"avatar_url": "https://secure.gravatar.com/avatar/5539fccd965e1b19e6c8b714b41d929e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
900
|
+
"login": "brandonweiss",
|
901
|
+
"url": "https://api.github.com/users/brandonweiss",
|
902
|
+
"id": 4727
|
903
|
+
},
|
904
|
+
"closed_at": null,
|
905
|
+
"created_at": "2012-09-05T05:27:29Z",
|
906
|
+
"comments": 3,
|
907
|
+
"title": "force_ssl seems to drop optional path segments when redirecting to https",
|
908
|
+
"state": "open",
|
909
|
+
"pull_request": {
|
910
|
+
"patch_url": null,
|
911
|
+
"html_url": null,
|
912
|
+
"diff_url": null
|
913
|
+
},
|
914
|
+
"number": 7528,
|
915
|
+
"html_url": "https://github.com/rails/rails/issues/7528",
|
916
|
+
"updated_at": "2012-09-08T13:09:25Z",
|
917
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7528",
|
918
|
+
"assignee": null,
|
919
|
+
"id": 6653037
|
920
|
+
},
|
921
|
+
{
|
922
|
+
"body": "If you have a model with a has_many association and that other model has an association set to a model instance and you update it by setting the foreign key to something else, it will become unset when the original model is saved.\nThis occurs in 3.2.8 and the 3-2-stable branch.\n\nProbably make more sense with an example:\n\n rails new has_many_bug\n cd has_many_bug\n bundle exec rails g model user\n bundle exec rails g model author\n bundle exec rails g model book user:references author:references\n #Edit config/application.rb and comment out following line\n config.active_record.whitelist_attributes\n\nModels:\n\n class Author < ActiveRecord::Base\n has_many :books\n end\n class Book < ActiveRecord::Base\n belongs_to :user\n belongs_to :author\n end\n class User < ActiveRecord::Base\n has_many :books\n end\n\ntest.rb:\n\n a1 = Author.create\n a2 = Author.create\n u=User.new\n b1 = Book.new(:author=>a1)\n b1.attributes = {:author_id => a2.id}\n u.books = [b1]\n puts \"a1.id = #{a1.id}\"\n puts \"a2.id = #{a2.id}\"\n puts \"b1.author_id before save = #{b1.author_id}\"\n #Uncomment the following line and it will work\n #puts \"b1.author = #{b1.author}\"\n u.save\n puts \"b1.author_id after save = #{b1.author_id}\"\n\nResults in:\n\n irb(main):001:0> load 'test.rb'\n a1.id = 43\n a2.id = 44\n b1.author_id before save = 44\n b1.author_id after save = 43\n\n",
|
923
|
+
"milestone": null,
|
924
|
+
"labels": [
|
925
|
+
{
|
926
|
+
"name": "activerecord",
|
927
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
928
|
+
"color": "0b02e1"
|
929
|
+
},
|
930
|
+
{
|
931
|
+
"name": "3-2-stable",
|
932
|
+
"url": "https://api.github.com/repos/rails/rails/labels/3-2-stable",
|
933
|
+
"color": "02d7e1"
|
934
|
+
}
|
935
|
+
],
|
936
|
+
"user": {
|
937
|
+
"gravatar_id": "420291e1b7d022cf4fe73023ab345672",
|
938
|
+
"avatar_url": "https://secure.gravatar.com/avatar/420291e1b7d022cf4fe73023ab345672?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
939
|
+
"login": "bpardee",
|
940
|
+
"url": "https://api.github.com/users/bpardee",
|
941
|
+
"id": 308614
|
942
|
+
},
|
943
|
+
"closed_at": null,
|
944
|
+
"created_at": "2012-09-05T02:08:32Z",
|
945
|
+
"comments": 0,
|
946
|
+
"title": "Association not getting saved correctly",
|
947
|
+
"state": "open",
|
948
|
+
"pull_request": {
|
949
|
+
"patch_url": null,
|
950
|
+
"html_url": null,
|
951
|
+
"diff_url": null
|
952
|
+
},
|
953
|
+
"number": 7526,
|
954
|
+
"html_url": "https://github.com/rails/rails/issues/7526",
|
955
|
+
"updated_at": "2012-09-05T02:08:32Z",
|
956
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7526",
|
957
|
+
"assignee": null,
|
958
|
+
"id": 6651074
|
959
|
+
},
|
960
|
+
{
|
961
|
+
"body": "Note: the commits here are split to facilitate discussion. Happy to squash before merging.\n\nThe attached commits fix two bugs in `ActiveRecord::Store` and add a new feature. \n\n* the first commit moves the call to `will_change!` above the actual change to the attribute - otherwise, the attribute is marked as changed but attempts to access the previous value (using `_was` or `_change`) will return the *new* value instead\n\n* the second commit ensures that additional calls to `store_accessor` don't overwrite previously-set values in `stored_attributes`. This functionality is described in the documentation (regarding subclasses) but subsequent calls to `store_accessor` overwrote the list each time.\n\n* the final commit adds a new variant of `store_accessor` that provides type conversion for booleans to simplify (for instance) setting stored attributes with checkboxes. An example:\n\n```ruby\nclass User < ActiveRecord::Base\n store :flags\n store_boolean_attribute :flags, :likes_ruby, :likes_python, :likes_clojure\nend\n\nUser.first.likes_ruby? # => returns true or false\n\n@user.update_attributes(:likes_ruby => '0') # => stores false in flags['likes_ruby']\n```\n\nThere is some fairly gross duplication between `store_accessor` and `store_boolean_accessor`; any suggestions for a refactor are welcome - as is a better name than `store_boolean_accessor`.\n\nOne other open question: would it be better to add more \"typed\" variants to handle parsing input (for datetimes, etc)? My application only needed booleans, but there's certainly an argument to be made for extending the same type-casting behavior to `store_accessor` attributes as plain attributes.",
|
962
|
+
"milestone": null,
|
963
|
+
"labels": [
|
964
|
+
{
|
965
|
+
"name": "activerecord",
|
966
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
967
|
+
"color": "0b02e1"
|
968
|
+
}
|
969
|
+
],
|
970
|
+
"user": {
|
971
|
+
"gravatar_id": "6883e5ef03484d4fcef507d7b4f1d243",
|
972
|
+
"avatar_url": "https://secure.gravatar.com/avatar/6883e5ef03484d4fcef507d7b4f1d243?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
973
|
+
"login": "al2o3cr",
|
974
|
+
"url": "https://api.github.com/users/al2o3cr",
|
975
|
+
"id": 1191
|
976
|
+
},
|
977
|
+
"closed_at": null,
|
978
|
+
"created_at": "2012-09-04T22:49:08Z",
|
979
|
+
"comments": 16,
|
980
|
+
"title": "Add boolean type conversion for AR::Store",
|
981
|
+
"state": "open",
|
982
|
+
"pull_request": {
|
983
|
+
"patch_url": "https://github.com/rails/rails/pull/7524.patch",
|
984
|
+
"html_url": "https://github.com/rails/rails/pull/7524",
|
985
|
+
"diff_url": "https://github.com/rails/rails/pull/7524.diff"
|
986
|
+
},
|
987
|
+
"number": 7524,
|
988
|
+
"html_url": "https://github.com/rails/rails/issues/7524",
|
989
|
+
"updated_at": "2012-09-07T23:07:18Z",
|
990
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7524",
|
991
|
+
"assignee": null,
|
992
|
+
"id": 6648377
|
993
|
+
},
|
994
|
+
{
|
995
|
+
"body": "As Aaron Patterson mentioned, 3.2+ should have support for a DATABASE_URL environment variable. (For background discussion please refer to https://groups.google.com/forum/#!topic/rubyonrails-core/ge1HCeBqz_s)\n\n- added tests to confirm establish_connection uses DATABASE_URL and\n Rails.env correctly even when no arguments are passed in.\n- updated rake db tasks to support DATABASE_URL, and added tests to\n confirm correct behavior for these rake tasks. (Removed\n establish_connection call from some tasks since in those cases\n the :environment task already made sure the function would be called)\n- updated Resolver so that when it resolves the database url, it\n removes hash values with empty strings from the config spec (e.g.\n to support connection to postgresql when no username is specified).\n\nThis fix can also address issues #6736 and #6833 (as slightly different implementation solution).",
|
996
|
+
"milestone": null,
|
997
|
+
"labels": [
|
998
|
+
{
|
999
|
+
"name": "activerecord",
|
1000
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1001
|
+
"color": "0b02e1"
|
1002
|
+
}
|
1003
|
+
],
|
1004
|
+
"user": {
|
1005
|
+
"gravatar_id": "d308241c047f7d688b21835a0d47b369",
|
1006
|
+
"avatar_url": "https://secure.gravatar.com/avatar/d308241c047f7d688b21835a0d47b369?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1007
|
+
"login": "graceliu",
|
1008
|
+
"url": "https://api.github.com/users/graceliu",
|
1009
|
+
"id": 94903
|
1010
|
+
},
|
1011
|
+
"closed_at": null,
|
1012
|
+
"created_at": "2012-09-04T17:26:37Z",
|
1013
|
+
"comments": 11,
|
1014
|
+
"title": "Fixed support for DATABASE_URL for rake db tasks",
|
1015
|
+
"state": "open",
|
1016
|
+
"pull_request": {
|
1017
|
+
"patch_url": "https://github.com/rails/rails/pull/7521.patch",
|
1018
|
+
"html_url": "https://github.com/rails/rails/pull/7521",
|
1019
|
+
"diff_url": "https://github.com/rails/rails/pull/7521.diff"
|
1020
|
+
},
|
1021
|
+
"number": 7521,
|
1022
|
+
"html_url": "https://github.com/rails/rails/issues/7521",
|
1023
|
+
"updated_at": "2012-09-10T17:05:54Z",
|
1024
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7521",
|
1025
|
+
"assignee": null,
|
1026
|
+
"id": 6640691
|
1027
|
+
},
|
1028
|
+
{
|
1029
|
+
"body": "The current code:\n\n\n # Returns the sequence name for a table's primary key or some other specified key.\n def default_sequence_name(table_name, pk = nil) #:nodoc:\n serial_sequence(table_name, pk || 'id').split('.').last\n rescue ActiveRecord::StatementInvalid\n \"#{table_name}_#{pk || 'id'}_seq\"\n end\n\nrails 4 is slightly different, but still has the \".split('.').last\" -- which is the bug.\n\nThis code seems to want to remove the schema name from the return value of \"serial_sequence\" -- a typical result from serial_sequence\" might look like \"public.foos_id_seq\" and the \".split('.').last\" would resolve to \"foos_id_seq\".\n\nthe code would then be used by something that fetched from that object -- which works for \"public\" (or anything that is in the schema_search path) but wil fails if you have a table/model for table \"other.foos\" (that is, something not in the schema_search path OR if there is a public.foos and a other.foos -- you'll aways fetch from \"public.foos\").\n\nsince there is no \"next_sequence_value\" function this code probably has never been exercised -- sequence_name doesn't seem to be used anywhere for postgres, by default -- so you'll need the following code to exercise the issue:\n\n * enable prefetching of the primary key\n * add a \"next_sequence_value\" which simply requests the nextval for the value returned by sequence_name\n * and a patch to fix \"default_sequence_name\"\n\n\n\n module ActiveRecord::ConnectionAdapters\n class PostgreSQLAdapter < AbstractAdapter\n def prefetch_primary_key?(table_name = nil)\n return true\n end\n\n def next_sequence_value(sequence_name)\n return execute(\"select nextval('#{sequence_name}')\").field_values(\"nextval\").first.to_i\n end\n\n def default_sequence_name(table_name, pk = nil) #:nodoc:\n serial_sequence(table_name, pk || 'id')\n rescue ActiveRecord::StatementInvalid\n \"#{table_name}_#{pk || 'id'}_seq\"\n end\n\n end\n end\n",
|
1030
|
+
"milestone": null,
|
1031
|
+
"labels": [
|
1032
|
+
{
|
1033
|
+
"name": "activerecord",
|
1034
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1035
|
+
"color": "0b02e1"
|
1036
|
+
}
|
1037
|
+
],
|
1038
|
+
"user": {
|
1039
|
+
"gravatar_id": "f23c30d03f27dac9a573ada974726cc4",
|
1040
|
+
"avatar_url": "https://secure.gravatar.com/avatar/f23c30d03f27dac9a573ada974726cc4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1041
|
+
"login": "keithgabryelski",
|
1042
|
+
"url": "https://api.github.com/users/keithgabryelski",
|
1043
|
+
"id": 884378
|
1044
|
+
},
|
1045
|
+
"closed_at": null,
|
1046
|
+
"created_at": "2012-09-03T19:50:14Z",
|
1047
|
+
"comments": 0,
|
1048
|
+
"title": "postgresql_adapter.rb:default_sequence_name is broken for non-public schemas",
|
1049
|
+
"state": "open",
|
1050
|
+
"pull_request": {
|
1051
|
+
"patch_url": null,
|
1052
|
+
"html_url": null,
|
1053
|
+
"diff_url": null
|
1054
|
+
},
|
1055
|
+
"number": 7516,
|
1056
|
+
"html_url": "https://github.com/rails/rails/issues/7516",
|
1057
|
+
"updated_at": "2012-09-03T19:50:14Z",
|
1058
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7516",
|
1059
|
+
"assignee": null,
|
1060
|
+
"id": 6621611
|
1061
|
+
},
|
1062
|
+
{
|
1063
|
+
"body": "The goal is to show a the user simple AJAX example that they can get up and running quickly.",
|
1064
|
+
"milestone": null,
|
1065
|
+
"labels": [
|
1066
|
+
{
|
1067
|
+
"name": "docs",
|
1068
|
+
"url": "https://api.github.com/repos/rails/rails/labels/docs",
|
1069
|
+
"color": "02d7e1"
|
1070
|
+
}
|
1071
|
+
],
|
1072
|
+
"user": {
|
1073
|
+
"gravatar_id": "66c680f88e8c379fe408d32299dfb4e6",
|
1074
|
+
"avatar_url": "https://secure.gravatar.com/avatar/66c680f88e8c379fe408d32299dfb4e6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1075
|
+
"login": "aantix",
|
1076
|
+
"url": "https://api.github.com/users/aantix",
|
1077
|
+
"id": 4600
|
1078
|
+
},
|
1079
|
+
"closed_at": null,
|
1080
|
+
"created_at": "2012-09-03T08:55:08Z",
|
1081
|
+
"comments": 2,
|
1082
|
+
"title": "Added a simple example demonstrating an ajax/remote form, it's correspon...",
|
1083
|
+
"state": "open",
|
1084
|
+
"pull_request": {
|
1085
|
+
"patch_url": "https://github.com/rails/rails/pull/7512.patch",
|
1086
|
+
"html_url": "https://github.com/rails/rails/pull/7512",
|
1087
|
+
"diff_url": "https://github.com/rails/rails/pull/7512.diff"
|
1088
|
+
},
|
1089
|
+
"number": 7512,
|
1090
|
+
"html_url": "https://github.com/rails/rails/issues/7512",
|
1091
|
+
"updated_at": "2012-09-03T15:03:21Z",
|
1092
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7512",
|
1093
|
+
"assignee": null,
|
1094
|
+
"id": 6611331
|
1095
|
+
},
|
1096
|
+
{
|
1097
|
+
"body": "I did a poll on Twitter to see what parts of Rails needed documentation the most, and one glaring thing that was pointed out was how out of date the AJAX guide was.\n\nCurrently, this request is not ready to be merged, but I wanted to get some feedback on what I plan to do before I bother to write the entire thing.\n\nBasically, I built a new outline, and threw a quick paragraph or two together for a bunch of the parts.\n\nCurrent guide (NOT the one I'm working on) is [here](http://edgeguides.rubyonrails.org/ajax_on_rails.html), for reference.\n\n## Questions\n\nSome specific feedback I'd like addressed before I flesh this out more:\n\n### Intro to AJAX\n\nWhen this guide was written, AJAX was a bit newer of a technique. The original guide had an explanation of what AJAX is. Now that everybody knows what's up, do we still need this?\n\n### library coverage\n\nI plan on (and have in the outline) linking to a bunch of different projects that are used for testing JS, for example. Is the 'give a bunch of them a paragraph and a link' something we want here?\n\n### SPAs?\n\nI wrote up a little section mentioning Ember, Backbone, and Throne of JS. Obviously, \"How to write a heavy JS app\" is out of the scope of this guide, but I felt that mentioning tools that people can transition to once they get a lot of JS going would make sense. Is this useful?\n\n/cc @fxn @radar @wycats @dhh",
|
1098
|
+
"milestone": null,
|
1099
|
+
"labels": [
|
1100
|
+
{
|
1101
|
+
"name": "docs",
|
1102
|
+
"url": "https://api.github.com/repos/rails/rails/labels/docs",
|
1103
|
+
"color": "02d7e1"
|
1104
|
+
}
|
1105
|
+
],
|
1106
|
+
"user": {
|
1107
|
+
"gravatar_id": "233c279c012ebac792aaa805f966cbc7",
|
1108
|
+
"avatar_url": "https://secure.gravatar.com/avatar/233c279c012ebac792aaa805f966cbc7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1109
|
+
"login": "steveklabnik",
|
1110
|
+
"url": "https://api.github.com/users/steveklabnik",
|
1111
|
+
"id": 27786
|
1112
|
+
},
|
1113
|
+
"closed_at": null,
|
1114
|
+
"created_at": "2012-08-31T03:25:21Z",
|
1115
|
+
"comments": 20,
|
1116
|
+
"title": "Re-writing the AJAX Guide",
|
1117
|
+
"state": "open",
|
1118
|
+
"pull_request": {
|
1119
|
+
"patch_url": "https://github.com/rails/rails/pull/7493.patch",
|
1120
|
+
"html_url": "https://github.com/rails/rails/pull/7493",
|
1121
|
+
"diff_url": "https://github.com/rails/rails/pull/7493.diff"
|
1122
|
+
},
|
1123
|
+
"number": 7493,
|
1124
|
+
"html_url": "https://github.com/rails/rails/issues/7493",
|
1125
|
+
"updated_at": "2012-09-03T15:04:23Z",
|
1126
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7493",
|
1127
|
+
"assignee": null,
|
1128
|
+
"id": 6570384
|
1129
|
+
},
|
1130
|
+
{
|
1131
|
+
"body": "Rails 3.2.8\n\nAs an example:\n```ruby\nclass Thing < ActiveRecord::Base\n has_many :foos\n has_many :bars\n\n scope :with_foos, preload(:foos)\n scope :with_bars, preload(:bars)\nend\n\nThing.with_foos.with_bars.preload_values #=> [:bars], instead of the expected [:foos, :bars]\n```\n\nAll other `*_values` seem to work as expected (group, includes, joins, etc).",
|
1132
|
+
"milestone": null,
|
1133
|
+
"labels": [
|
1134
|
+
{
|
1135
|
+
"name": "activerecord",
|
1136
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1137
|
+
"color": "0b02e1"
|
1138
|
+
}
|
1139
|
+
],
|
1140
|
+
"user": {
|
1141
|
+
"gravatar_id": "f2b145e732ca71c9fdfe56ed040d7490",
|
1142
|
+
"avatar_url": "https://secure.gravatar.com/avatar/f2b145e732ca71c9fdfe56ed040d7490?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1143
|
+
"login": "contentfree",
|
1144
|
+
"url": "https://api.github.com/users/contentfree",
|
1145
|
+
"id": 10958
|
1146
|
+
},
|
1147
|
+
"closed_at": null,
|
1148
|
+
"created_at": "2012-08-30T22:29:22Z",
|
1149
|
+
"comments": 5,
|
1150
|
+
"title": "Chaining multiple scopes that use preload() results in only the last preload() being applied",
|
1151
|
+
"state": "open",
|
1152
|
+
"pull_request": {
|
1153
|
+
"patch_url": null,
|
1154
|
+
"html_url": null,
|
1155
|
+
"diff_url": null
|
1156
|
+
},
|
1157
|
+
"number": 7490,
|
1158
|
+
"html_url": "https://github.com/rails/rails/issues/7490",
|
1159
|
+
"updated_at": "2012-08-31T00:10:48Z",
|
1160
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7490",
|
1161
|
+
"assignee": null,
|
1162
|
+
"id": 6566835
|
1163
|
+
},
|
1164
|
+
{
|
1165
|
+
"body": "Currently, using mysql one can specify sslca in database.yml to say that one should connect to the database using SSL.\n\nHowever, rails dbconsole does not honor this setting. The enclosed patch fixes this.\n\n-Lars and Jim\n",
|
1166
|
+
"milestone": null,
|
1167
|
+
"labels": [
|
1168
|
+
{
|
1169
|
+
"name": "railties",
|
1170
|
+
"url": "https://api.github.com/repos/rails/rails/labels/railties",
|
1171
|
+
"color": "8BE06E"
|
1172
|
+
}
|
1173
|
+
],
|
1174
|
+
"user": {
|
1175
|
+
"gravatar_id": "28549512f89c6fa064bc5c9c5eb0baed",
|
1176
|
+
"avatar_url": "https://secure.gravatar.com/avatar/28549512f89c6fa064bc5c9c5eb0baed?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1177
|
+
"login": "needfeed",
|
1178
|
+
"url": "https://api.github.com/users/needfeed",
|
1179
|
+
"id": 708949
|
1180
|
+
},
|
1181
|
+
"closed_at": null,
|
1182
|
+
"created_at": "2012-08-30T17:44:38Z",
|
1183
|
+
"comments": 4,
|
1184
|
+
"title": "Have rails dbconsole pass sslca to the mysql command line client.",
|
1185
|
+
"state": "open",
|
1186
|
+
"pull_request": {
|
1187
|
+
"patch_url": "https://github.com/rails/rails/pull/7488.patch",
|
1188
|
+
"html_url": "https://github.com/rails/rails/pull/7488",
|
1189
|
+
"diff_url": "https://github.com/rails/rails/pull/7488.diff"
|
1190
|
+
},
|
1191
|
+
"number": 7488,
|
1192
|
+
"html_url": "https://github.com/rails/rails/issues/7488",
|
1193
|
+
"updated_at": "2012-09-08T00:45:01Z",
|
1194
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7488",
|
1195
|
+
"assignee": null,
|
1196
|
+
"id": 6559993
|
1197
|
+
},
|
1198
|
+
{
|
1199
|
+
"body": "Originally reported under ernie/squeel#161 but it's happening with vanilla rails 3.2.8 too:\n\n```ruby\nclass A < ActiveRecord::Base\n has_many :a_b_mappings, :inverse_of => :a\n has_many :b, :through => :a_b_mappings, :source => :b, :conditions => {:context => \"foo\"}\nend\n\nclass B < ActiveRecord::Base\n has_many :a_b_mappings, :inverse_of => :b\nend\n\nclass ABMapping < ActiveRecord::Base\n self.table_name = :a_b_mappings\n belongs_to :a, :inverse_of => :a_b_mappings\n belongs_to :b, :inverse_of => :a_b_mappings\nend\n\n\nputs A.first.b.create.tap{|b| puts b.inspect}.a_b_mappings.inspect\n# #<B id: 3, context: nil> \n# [#<ABMapping id: 2, a_id: 1, b_id: 2>]\n```\n\nIt creates the through-association but does not set the conditions on table `B`. I.e. `context` is expected to be \"foo\", not nil.\n\n\nThe `Associations::ClassMethods` documentation states the following:\n\n>**conditions**\n> Specify the conditions that the associated objects must meet in order to be included as a WHERE SQL fragment, such as price > 5 AND name LIKE 'B%'. Record creations from the association are scoped if a hash is used. has_many :posts, :conditions => {:published => true} will create published posts with @blog.posts.create or @blog.posts.build.\n",
|
1200
|
+
"milestone": null,
|
1201
|
+
"labels": [
|
1202
|
+
{
|
1203
|
+
"name": "activerecord",
|
1204
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1205
|
+
"color": "0b02e1"
|
1206
|
+
}
|
1207
|
+
],
|
1208
|
+
"user": {
|
1209
|
+
"gravatar_id": "97aa8c37ffa60c4262955aefae56e605",
|
1210
|
+
"avatar_url": "https://secure.gravatar.com/avatar/97aa8c37ffa60c4262955aefae56e605?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1211
|
+
"login": "the8472",
|
1212
|
+
"url": "https://api.github.com/users/the8472",
|
1213
|
+
"id": 1065730
|
1214
|
+
},
|
1215
|
+
"closed_at": null,
|
1216
|
+
"created_at": "2012-08-30T15:43:05Z",
|
1217
|
+
"comments": 1,
|
1218
|
+
"title": "Building a has_many :through with :conditions",
|
1219
|
+
"state": "open",
|
1220
|
+
"pull_request": {
|
1221
|
+
"patch_url": null,
|
1222
|
+
"html_url": null,
|
1223
|
+
"diff_url": null
|
1224
|
+
},
|
1225
|
+
"number": 7486,
|
1226
|
+
"html_url": "https://github.com/rails/rails/issues/7486",
|
1227
|
+
"updated_at": "2012-08-30T17:34:53Z",
|
1228
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7486",
|
1229
|
+
"assignee": null,
|
1230
|
+
"id": 6556782
|
1231
|
+
},
|
1232
|
+
{
|
1233
|
+
"body": "For now tests are a bit outdated and we're using sprockets-rails from rubygems, I think to use it from github sounds more reasonable.\n\n/cc @guilleiguaran\n\nBTW: We should add changelog entry about removing manifest option, I think.",
|
1234
|
+
"milestone": null,
|
1235
|
+
"labels": [
|
1236
|
+
{
|
1237
|
+
"name": "asset pipeline",
|
1238
|
+
"url": "https://api.github.com/repos/rails/rails/labels/asset+pipeline",
|
1239
|
+
"color": "d7e102"
|
1240
|
+
}
|
1241
|
+
],
|
1242
|
+
"user": {
|
1243
|
+
"gravatar_id": "b97b92886055641a956499b3cbb473e6",
|
1244
|
+
"avatar_url": "https://secure.gravatar.com/avatar/b97b92886055641a956499b3cbb473e6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1245
|
+
"login": "route",
|
1246
|
+
"url": "https://api.github.com/users/route",
|
1247
|
+
"id": 414803
|
1248
|
+
},
|
1249
|
+
"closed_at": null,
|
1250
|
+
"created_at": "2012-08-30T09:16:54Z",
|
1251
|
+
"comments": 8,
|
1252
|
+
"title": "Use last version of sprockets-rails and sync tests for assets.",
|
1253
|
+
"state": "open",
|
1254
|
+
"pull_request": {
|
1255
|
+
"patch_url": "https://github.com/rails/rails/pull/7482.patch",
|
1256
|
+
"html_url": "https://github.com/rails/rails/pull/7482",
|
1257
|
+
"diff_url": "https://github.com/rails/rails/pull/7482.diff"
|
1258
|
+
},
|
1259
|
+
"number": 7482,
|
1260
|
+
"html_url": "https://github.com/rails/rails/issues/7482",
|
1261
|
+
"updated_at": "2012-09-09T21:36:44Z",
|
1262
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7482",
|
1263
|
+
"assignee": null,
|
1264
|
+
"id": 6548706
|
1265
|
+
},
|
1266
|
+
{
|
1267
|
+
"body": "I initially reported this bug against Rails 2.3.10 on February 10, 2011, see my report at https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/6406-activerecordxmlserializer-fails-with-has_one-types.\n\nThis bug remains unfixed in Rails 3.2.8. To see the problem, run the following code:\n\n```ruby\nclass Container < ActiveRecord::Base\n has_many :sti_outer_objs\n\n def dump\n to_xml({:include=>{:sti_outer_objs=>{:include=>{:sti_inner_obj=>{}}}}})\n end\nend\n\nclass StiOuterObj < ActiveRecord::Base\n belongs_to :container\n has_one :sti_inner_obj\nend\n\nclass StiOuterDerivedObj < StiOuterObj\nend\n\nclass StiInnerObj < ActiveRecord::Base\n belongs_to :sti_outer_obj\nend\n\nclass StiInnerDerivedObj < StiInnerObj\nend\n\nclass Setup < ActiveRecord::Migration\n def self.up\n create_table :containers do |t|\n end\n create_table :sti_outer_objs do |t|\n t.string :type\n t.belongs_to :container\n end\n create_table :sti_inner_objs do |t|\n t.string :type\n t.belongs_to :sti_outer_obj\n end\n container = Container.create!\n sti_outer_derived = StiOuterDerivedObj.create!(:container => container)\n sti_inner_derived = StiInnerDerivedObj.create!(:sti_outer_obj => sti_outer_derived)\n container = Container.find(container.id)\n puts container.dump\n end\n\n def self.down\n drop_table :containers\n drop_table :sti_outer_objs\n drop_table :sti_inner_objs\n end\nend\n```\n\nExpected output:\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<container>\n <id type=\"integer\">1</id>\n <sti-outer-objs type=\"array\">\n <sti-outer-obj type=\"StiOuterDerivedObj\">\n <id type=\"integer\">1</id>\n <container-id type=\"integer\">1</container-id>\n <sti-inner-obj type=\"StiInnerDerivedObj\">\n <id type=\"integer\">1</id>\n <sti-outer-obj-id type=\"integer\">1</sti-outer-obj-id>\n </sti-inner-obj>\n </sti-outer-obj>\n </sti-outer-objs>\n</container>\n```\n\nActual output:\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<container>\n <id type=\"integer\">1</id>\n <sti-outer-objs type=\"array\">\n <sti-outer-obj type=\"StiOuterDerivedObj\">\n <id type=\"integer\">1</id>\n <container-id type=\"integer\">1</container-id>\n <sti-inner-obj>\n <id type=\"integer\">1</id>\n <sti-outer-obj-id type=\"integer\">1</sti-outer-obj-id>\n </sti-inner-obj>\n </sti-outer-obj>\n </sti-outer-objs>\n</container>\n```\n\nNote that the inner object is incorrectly claimed to be of type sti_inner_obj when in fact it is sti_inner_derived_obj. That is, its true type is not being determined by the serializer code and instead, just by the association. This makes it **impossible to unserialize correctly**.",
|
1268
|
+
"milestone": null,
|
1269
|
+
"labels": [
|
1270
|
+
{
|
1271
|
+
"name": "activemodel",
|
1272
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activemodel",
|
1273
|
+
"color": "00E5FF"
|
1274
|
+
}
|
1275
|
+
],
|
1276
|
+
"user": {
|
1277
|
+
"gravatar_id": "75bf0b37c5c32e5d869476f18c2faea8",
|
1278
|
+
"avatar_url": "https://secure.gravatar.com/avatar/75bf0b37c5c32e5d869476f18c2faea8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1279
|
+
"login": "cliochris",
|
1280
|
+
"url": "https://api.github.com/users/cliochris",
|
1281
|
+
"id": 472580
|
1282
|
+
},
|
1283
|
+
"closed_at": null,
|
1284
|
+
"created_at": "2012-08-28T17:53:41Z",
|
1285
|
+
"comments": 6,
|
1286
|
+
"title": "Rails 3.2.8 ActiveModel::Serializers::Xml::Serializer ignores has_one sti",
|
1287
|
+
"state": "open",
|
1288
|
+
"pull_request": {
|
1289
|
+
"patch_url": null,
|
1290
|
+
"html_url": null,
|
1291
|
+
"diff_url": null
|
1292
|
+
},
|
1293
|
+
"number": 7471,
|
1294
|
+
"html_url": "https://github.com/rails/rails/issues/7471",
|
1295
|
+
"updated_at": "2012-09-05T17:31:04Z",
|
1296
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7471",
|
1297
|
+
"assignee": null,
|
1298
|
+
"id": 6505637
|
1299
|
+
},
|
1300
|
+
{
|
1301
|
+
"body": "I just tracked a strange problem I was having with my view specs to ActionController::TemplateAssertions. It is using instance variables @partials, @templates, and @layouts on the test itself. I was populating the @templates variable, which is what my view expects to receive. Since TemplateAssertions doesn't expect this, it fails with a \"can't convert\" error.\n\nTemplateAssertion's internal variables should not be mixed into the test itself. Agree/disagree?",
|
1302
|
+
"milestone": null,
|
1303
|
+
"labels": [
|
1304
|
+
{
|
1305
|
+
"name": "actionpack",
|
1306
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
1307
|
+
"color": "FFF700"
|
1308
|
+
}
|
1309
|
+
],
|
1310
|
+
"user": {
|
1311
|
+
"gravatar_id": "c20e5f68a1a046448f77ecaf39b7801d",
|
1312
|
+
"avatar_url": "https://secure.gravatar.com/avatar/c20e5f68a1a046448f77ecaf39b7801d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1313
|
+
"login": "rehevkor5",
|
1314
|
+
"url": "https://api.github.com/users/rehevkor5",
|
1315
|
+
"id": 16899
|
1316
|
+
},
|
1317
|
+
"closed_at": null,
|
1318
|
+
"created_at": "2012-08-27T19:37:41Z",
|
1319
|
+
"comments": 1,
|
1320
|
+
"title": "ActionController::TemplateAssertions pollutes @partials, @templates, and @layouts",
|
1321
|
+
"state": "open",
|
1322
|
+
"pull_request": {
|
1323
|
+
"patch_url": null,
|
1324
|
+
"html_url": null,
|
1325
|
+
"diff_url": null
|
1326
|
+
},
|
1327
|
+
"number": 7459,
|
1328
|
+
"html_url": "https://github.com/rails/rails/issues/7459",
|
1329
|
+
"updated_at": "2012-08-27T21:24:01Z",
|
1330
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7459",
|
1331
|
+
"assignee": null,
|
1332
|
+
"id": 6482510
|
1333
|
+
},
|
1334
|
+
{
|
1335
|
+
"body": "Rails 3.2.8.\n\nI've got a .js.erb file where I need to use both manifest and a magic comment, and I would assume that this should work:\n\n <%# encoding: utf-8 %>\n //= require some_stuff\n\nor at least this should work:\n\n <%# encoding: utf-8 %>//= require some_stuff\n\nas erb processing has to be done before js processing resulting in js getting simple\n\n //= require some_stuff\n\nBut for some strange reason manifest directives don't work and are just included as text. Putting manifest definitions the first and encoding the second enables manifest but disables encoding.",
|
1336
|
+
"milestone": null,
|
1337
|
+
"labels": [
|
1338
|
+
{
|
1339
|
+
"name": "asset pipeline",
|
1340
|
+
"url": "https://api.github.com/repos/rails/rails/labels/asset+pipeline",
|
1341
|
+
"color": "d7e102"
|
1342
|
+
}
|
1343
|
+
],
|
1344
|
+
"user": {
|
1345
|
+
"gravatar_id": "87767d2bcb721f784f4ae0b61819510a",
|
1346
|
+
"avatar_url": "https://secure.gravatar.com/avatar/87767d2bcb721f784f4ae0b61819510a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1347
|
+
"login": "Exoth",
|
1348
|
+
"url": "https://api.github.com/users/Exoth",
|
1349
|
+
"id": 238863
|
1350
|
+
},
|
1351
|
+
"closed_at": null,
|
1352
|
+
"created_at": "2012-08-27T12:25:04Z",
|
1353
|
+
"comments": 9,
|
1354
|
+
"title": "Simultaenous use of manifest and a magic comment",
|
1355
|
+
"state": "open",
|
1356
|
+
"pull_request": {
|
1357
|
+
"patch_url": null,
|
1358
|
+
"html_url": null,
|
1359
|
+
"diff_url": null
|
1360
|
+
},
|
1361
|
+
"number": 7455,
|
1362
|
+
"html_url": "https://github.com/rails/rails/issues/7455",
|
1363
|
+
"updated_at": "2012-08-31T19:31:18Z",
|
1364
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7455",
|
1365
|
+
"assignee": null,
|
1366
|
+
"id": 6472286
|
1367
|
+
},
|
1368
|
+
{
|
1369
|
+
"body": "@tenderlove this PR is based on our discussion in #7424\n\nWhen `ActionDispatch::ParamsParser#parse_formatted_parameters` raises an exception, it's re-raised as `ActionDispatch::ParamsParser::ParseError` instead of the original exception - we're assuming that the only thing that can raise an exception there is a parser. This way it's much easier to catch parsing error that originated in `ParamsParser` (skipping parsing errors raised later down the chain e.g. in actions) and return a custom response e.g. 400.\n\nBTW. There's a funky thing going on with request body in `ParamsParser#parse_formatted_parameters` ([link](https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/params_parser.rb#L37-58)). Proc and Yaml strategies use `request.raw_post` (which reads request body and then rewinds it before being parsed), but JSON and XML ones read and rewind request body on their own e.g.:\n\n```ruby\nwhen :json\n data = ActiveSupport::JSON.decode(request.body)\n request.body.rewind if request.body.respond_to?(:rewind)\n ...\n```\n\nThe issue is that if JSON.decode raises an exception, request body is not rewinded and thus calling `request.raw_post` later inside the error handler returns nil. Is there any reason why not all strategies use `request.raw_post`? This should most likely fix this issue.",
|
1370
|
+
"milestone": null,
|
1371
|
+
"labels": [
|
1372
|
+
{
|
1373
|
+
"name": "actionpack",
|
1374
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
1375
|
+
"color": "FFF700"
|
1376
|
+
}
|
1377
|
+
],
|
1378
|
+
"user": {
|
1379
|
+
"gravatar_id": "2b2b07fe8688479d2559704d4bf8a264",
|
1380
|
+
"avatar_url": "https://secure.gravatar.com/avatar/2b2b07fe8688479d2559704d4bf8a264?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1381
|
+
"login": "szimek",
|
1382
|
+
"url": "https://api.github.com/users/szimek",
|
1383
|
+
"id": 9873
|
1384
|
+
},
|
1385
|
+
"closed_at": null,
|
1386
|
+
"created_at": "2012-08-24T19:26:11Z",
|
1387
|
+
"comments": 2,
|
1388
|
+
"title": "Raise generic ParseError exception when ParamsParser fails parsing request params",
|
1389
|
+
"state": "open",
|
1390
|
+
"pull_request": {
|
1391
|
+
"patch_url": "https://github.com/rails/rails/pull/7444.patch",
|
1392
|
+
"html_url": "https://github.com/rails/rails/pull/7444",
|
1393
|
+
"diff_url": "https://github.com/rails/rails/pull/7444.diff"
|
1394
|
+
},
|
1395
|
+
"number": 7444,
|
1396
|
+
"html_url": "https://github.com/rails/rails/issues/7444",
|
1397
|
+
"updated_at": "2012-08-27T22:15:32Z",
|
1398
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7444",
|
1399
|
+
"assignee": null,
|
1400
|
+
"id": 6442147
|
1401
|
+
},
|
1402
|
+
{
|
1403
|
+
"body": "In Rails 3.2.6 (need to see if is problem in latest), we have models similar to:\n\n class Library < ActiveRecord::Base\n attr_accessible :name, :address, :phone_number\n has_many :books\n end\n \n class LibraryRef < Library\n self.table_name = :libraries\n \n # redefine accessible_attributes (messy way to set- it should have a better way to redefine)\n self._accessible_attributes[:default] = [:name]\n end\n \n class Book < ActiveRecord::Base\n attr_accessible :title, :isbn, :checked_out\n belongs_to :library, primary_key: :library_id, class_name: 'LibraryRef'\n end\n\nAnd when referring to Library before querying on Book, :name, :address, :phone_number were mass assignable.\n\nAfter querying on Book which returned LibraryRef, if we query on Library again, it acts as if it were a LibraryRef because its mass assigned attributes have been redefined.\n\nThis is confusing because the whole point to class_attribute (like self._accessible_attributes in this case) was that it supported subclassing, I thought.\n\nI've not had time to check this out outside of our app, so it might not be an issue, and it may have been fixed or in another ticket already- I looked but didn't see it.\n\nLet me know if this looks familiar or you can easily reproduce. Otherwise, I'll try to confirm it outside of our application as soon as I have time.\n\nIn the meantime, this is the workaround:\n\n module LibraryShared\n extend ActiveSupport::Concern\n \n included do\n attr_accessible :name, :address, :phone_number\n has_many :books\n end\n\n module ClassMethods\n end\n end\n\n class Library < ActiveRecord::Base\n include LibraryShared\n end\n \n class LibraryRef < Library\n include LibraryShared\n \n self.table_name = :libraries\n \n # redefine accessible_attributes (messy way to set- it should have a better way to redefine)\n self._accessible_attributes[:default] = [:name]\n end\n \n class Book < ActiveRecord::Base\n attr_accessible :title, :isbn, :checked_out\n belongs_to :library, primary_key: :library_id, class_name: 'LibraryRef'\n end\n\nThanks!",
|
1404
|
+
"milestone": null,
|
1405
|
+
"labels": [
|
1406
|
+
{
|
1407
|
+
"name": "activemodel",
|
1408
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activemodel",
|
1409
|
+
"color": "00E5FF"
|
1410
|
+
},
|
1411
|
+
{
|
1412
|
+
"name": "activerecord",
|
1413
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1414
|
+
"color": "0b02e1"
|
1415
|
+
}
|
1416
|
+
],
|
1417
|
+
"user": {
|
1418
|
+
"gravatar_id": "8838005371ab9c0b1d40f0504bf8832a",
|
1419
|
+
"avatar_url": "https://secure.gravatar.com/avatar/8838005371ab9c0b1d40f0504bf8832a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1420
|
+
"login": "garysweaver",
|
1421
|
+
"url": "https://api.github.com/users/garysweaver",
|
1422
|
+
"id": 92330
|
1423
|
+
},
|
1424
|
+
"closed_at": null,
|
1425
|
+
"created_at": "2012-08-24T18:49:13Z",
|
1426
|
+
"comments": 0,
|
1427
|
+
"title": "Mass assignment attributes change when backwards association uses subclass that sets self._accessible_attributes[:default]",
|
1428
|
+
"state": "open",
|
1429
|
+
"pull_request": {
|
1430
|
+
"patch_url": null,
|
1431
|
+
"html_url": null,
|
1432
|
+
"diff_url": null
|
1433
|
+
},
|
1434
|
+
"number": 7442,
|
1435
|
+
"html_url": "https://github.com/rails/rails/issues/7442",
|
1436
|
+
"updated_at": "2012-08-24T18:53:04Z",
|
1437
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7442",
|
1438
|
+
"assignee": null,
|
1439
|
+
"id": 6441357
|
1440
|
+
},
|
1441
|
+
{
|
1442
|
+
"body": "```\nWord.offset(4).last\nSELECT \"words\".* FROM \"words\" OFFSET 4\n```\n\n```\nWord.last :offset => 4\nSELECT \"words\".* FROM \"words\" OFFSET 4\n```\n\nNot as expected. Missed order by id desc and limit 1;\n\n(model is empty, project empty 3.2.8, pg)",
|
1443
|
+
"milestone": null,
|
1444
|
+
"labels": [
|
1445
|
+
{
|
1446
|
+
"name": "activerecord",
|
1447
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1448
|
+
"color": "0b02e1"
|
1449
|
+
}
|
1450
|
+
],
|
1451
|
+
"user": {
|
1452
|
+
"gravatar_id": "e320beed5b9b212d0c478d96a0c0131f",
|
1453
|
+
"avatar_url": "https://secure.gravatar.com/avatar/e320beed5b9b212d0c478d96a0c0131f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1454
|
+
"login": "kostya",
|
1455
|
+
"url": "https://api.github.com/users/kostya",
|
1456
|
+
"id": 95060
|
1457
|
+
},
|
1458
|
+
"closed_at": null,
|
1459
|
+
"created_at": "2012-08-24T16:05:57Z",
|
1460
|
+
"comments": 6,
|
1461
|
+
"title": "offset + last bug",
|
1462
|
+
"state": "open",
|
1463
|
+
"pull_request": {
|
1464
|
+
"patch_url": null,
|
1465
|
+
"html_url": null,
|
1466
|
+
"diff_url": null
|
1467
|
+
},
|
1468
|
+
"number": 7441,
|
1469
|
+
"html_url": "https://github.com/rails/rails/issues/7441",
|
1470
|
+
"updated_at": "2012-09-01T19:12:34Z",
|
1471
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7441",
|
1472
|
+
"assignee": null,
|
1473
|
+
"id": 6437847
|
1474
|
+
},
|
1475
|
+
{
|
1476
|
+
"body": "The bug:\n\n Account.where('1 = 2').sum(\"2 * credit_limit\") => '0'\n\nThat is, sum with an expression (not a column name) on a condition or collection that returns no records returns the string \"0\", whereas it should return an integer, 0.",
|
1477
|
+
"milestone": null,
|
1478
|
+
"labels": [
|
1479
|
+
{
|
1480
|
+
"name": "activerecord",
|
1481
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1482
|
+
"color": "0b02e1"
|
1483
|
+
}
|
1484
|
+
],
|
1485
|
+
"user": {
|
1486
|
+
"gravatar_id": "53d301869ff9f450d180eb40fdcca434",
|
1487
|
+
"avatar_url": "https://secure.gravatar.com/avatar/53d301869ff9f450d180eb40fdcca434?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1488
|
+
"login": "refractalize",
|
1489
|
+
"url": "https://api.github.com/users/refractalize",
|
1490
|
+
"id": 123917
|
1491
|
+
},
|
1492
|
+
"closed_at": null,
|
1493
|
+
"created_at": "2012-08-24T09:34:30Z",
|
1494
|
+
"comments": 5,
|
1495
|
+
"title": "ActiveRecord: sum expression returns string '0' for no records, fixed",
|
1496
|
+
"state": "open",
|
1497
|
+
"pull_request": {
|
1498
|
+
"patch_url": "https://github.com/rails/rails/pull/7439.patch",
|
1499
|
+
"html_url": "https://github.com/rails/rails/pull/7439",
|
1500
|
+
"diff_url": "https://github.com/rails/rails/pull/7439.diff"
|
1501
|
+
},
|
1502
|
+
"number": 7439,
|
1503
|
+
"html_url": "https://github.com/rails/rails/issues/7439",
|
1504
|
+
"updated_at": "2012-09-08T00:42:32Z",
|
1505
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7439",
|
1506
|
+
"assignee": null,
|
1507
|
+
"id": 6429438
|
1508
|
+
},
|
1509
|
+
{
|
1510
|
+
"body": "With eager_load on, I'm get some AR class load error.\n\nI'm still totally confused, but I tracked it down to `AR::AttributeMethods::PrimaryKey` somehow installing itself before `::Read`. I think it has to do with the fact the `primary_key.rb` is required before `read.rb` (alpha ordering).\n\nhttps://github.com/rails/rails/blob/master/activerecord/lib/active_record.rb#L113-120\nhttps://github.com/rails/rails/blob/master/activerecord/lib/active_record/attribute_methods.rb#L9-18\n\n```\nNoMethodError: super: no superclass method `define_method_attribute' for #<Class:0x007fad82e995d0>\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/dynamic_matchers.rb:22:in `method_missing'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/attribute_methods/primary_key.rb:42:in `define_method_attribute'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activemodel/lib/active_model/attribute_methods.rb:280:in `block in define_attribute_method'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activemodel/lib/active_model/attribute_methods.rb:273:in `each'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activemodel/lib/active_model/attribute_methods.rb:273:in `define_attribute_method'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activemodel/lib/active_model/attribute_methods.rb:240:in `block in define_attribute_methods'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activemodel/lib/active_model/attribute_methods.rb:240:in `each'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activemodel/lib/active_model/attribute_methods.rb:240:in `define_attribute_methods'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/attribute_methods.rb:29:in `block in define_attribute_methods'\n\tfrom <internal:prelude>:10:in `synchronize'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/attribute_methods.rb:26:in `define_attribute_methods'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/attribute_methods.rb:122:in `respond_to?'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activesupport/lib/active_support/callbacks.rb:332:in `__define_callbacks'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activesupport/lib/active_support/callbacks.rb:73:in `run_callbacks'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/core.rb:212:in `init_with'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/inheritance.rb:97:in `instantiate'\n... 12 levels...\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/relation.rb:188:in `to_a'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/relation.rb:572:in `exec_queries'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/relation.rb:450:in `block in load'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/explain.rb:30:in `logging_query_plan'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/relation.rb:450:in `load'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/relation.rb:188:in `to_a'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/relation/finder_methods.rb:329:in `find_last'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/relation/finder_methods.rb:125:in `last'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/activerecord-deprecated_finders-fe150f26f009/lib/active_record/deprecated_finders/relation.rb:147:in `last'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/activerecord/lib/active_record/querying.rb:4:in `last'\n\tfrom (irb):1\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/railties/lib/rails/commands/console.rb:78:in `start'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/railties/lib/rails/commands/console.rb:9:in `start'\n\tfrom APP/vendor/gems/ruby/1.9.1/bundler/gems/rails-79e880f7f4f9/railties/lib/rails/commands.rb:47:in `<top (required)>'\n\tfrom script/rails:18:in `require'\n\tfrom script/rails:18:in `<main>'>> \n```\n\n/cc @tenderlove @carlosantoniodasilva @josevalim",
|
1511
|
+
"milestone": {
|
1512
|
+
"due_on": null,
|
1513
|
+
"description": "Changes that break 3.x API.",
|
1514
|
+
"created_at": "2011-10-09T02:53:46Z",
|
1515
|
+
"title": "4.0.0",
|
1516
|
+
"state": "open",
|
1517
|
+
"closed_issues": 10,
|
1518
|
+
"number": 9,
|
1519
|
+
"open_issues": 3,
|
1520
|
+
"url": "https://api.github.com/repos/rails/rails/milestones/9",
|
1521
|
+
"id": 44893,
|
1522
|
+
"creator": {
|
1523
|
+
"gravatar_id": "24d2f8804e6bb4b7ea6bd11e0a586470",
|
1524
|
+
"avatar_url": "https://secure.gravatar.com/avatar/24d2f8804e6bb4b7ea6bd11e0a586470?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1525
|
+
"login": "jeremy",
|
1526
|
+
"url": "https://api.github.com/users/jeremy",
|
1527
|
+
"id": 199
|
1528
|
+
}
|
1529
|
+
},
|
1530
|
+
"labels": [
|
1531
|
+
{
|
1532
|
+
"name": "bug",
|
1533
|
+
"url": "https://api.github.com/repos/rails/rails/labels/bug",
|
1534
|
+
"color": "444444"
|
1535
|
+
},
|
1536
|
+
{
|
1537
|
+
"name": "activerecord",
|
1538
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1539
|
+
"color": "0b02e1"
|
1540
|
+
},
|
1541
|
+
{
|
1542
|
+
"name": "activesupport",
|
1543
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
1544
|
+
"color": "FC9300"
|
1545
|
+
}
|
1546
|
+
],
|
1547
|
+
"user": {
|
1548
|
+
"gravatar_id": "bbe5dc8dcf248706525ab76f46185520",
|
1549
|
+
"avatar_url": "https://secure.gravatar.com/avatar/bbe5dc8dcf248706525ab76f46185520?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1550
|
+
"login": "josh",
|
1551
|
+
"url": "https://api.github.com/users/josh",
|
1552
|
+
"id": 137
|
1553
|
+
},
|
1554
|
+
"closed_at": null,
|
1555
|
+
"created_at": "2012-08-22T22:48:03Z",
|
1556
|
+
"comments": 0,
|
1557
|
+
"title": "Can't load AR records with eager_load=true",
|
1558
|
+
"state": "open",
|
1559
|
+
"pull_request": {
|
1560
|
+
"patch_url": null,
|
1561
|
+
"html_url": null,
|
1562
|
+
"diff_url": null
|
1563
|
+
},
|
1564
|
+
"number": 7428,
|
1565
|
+
"html_url": "https://github.com/rails/rails/issues/7428",
|
1566
|
+
"updated_at": "2012-09-05T20:25:05Z",
|
1567
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7428",
|
1568
|
+
"assignee": null,
|
1569
|
+
"id": 6393105
|
1570
|
+
},
|
1571
|
+
{
|
1572
|
+
"body": "Fixes encoding of large unicode characters (> 0xFFFF) to JSON. For Javascript / JSON these need to be encoded as a surrogate pair. Fixes Issue #3727",
|
1573
|
+
"milestone": null,
|
1574
|
+
"labels": [
|
1575
|
+
{
|
1576
|
+
"name": "activesupport",
|
1577
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
1578
|
+
"color": "FC9300"
|
1579
|
+
}
|
1580
|
+
],
|
1581
|
+
"user": {
|
1582
|
+
"gravatar_id": "a8d99d9d17ed9fd6c270efecb0c62c5f",
|
1583
|
+
"avatar_url": "https://secure.gravatar.com/avatar/a8d99d9d17ed9fd6c270efecb0c62c5f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1584
|
+
"login": "zbskii",
|
1585
|
+
"url": "https://api.github.com/users/zbskii",
|
1586
|
+
"id": 178036
|
1587
|
+
},
|
1588
|
+
"closed_at": null,
|
1589
|
+
"created_at": "2012-08-22T21:17:19Z",
|
1590
|
+
"comments": 2,
|
1591
|
+
"title": "Fixes encoding of 4 byte unicode characters to JSON",
|
1592
|
+
"state": "open",
|
1593
|
+
"pull_request": {
|
1594
|
+
"patch_url": "https://github.com/rails/rails/pull/7425.patch",
|
1595
|
+
"html_url": "https://github.com/rails/rails/pull/7425",
|
1596
|
+
"diff_url": "https://github.com/rails/rails/pull/7425.diff"
|
1597
|
+
},
|
1598
|
+
"number": 7425,
|
1599
|
+
"html_url": "https://github.com/rails/rails/issues/7425",
|
1600
|
+
"updated_at": "2012-08-26T20:28:26Z",
|
1601
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7425",
|
1602
|
+
"assignee": null,
|
1603
|
+
"id": 6391033
|
1604
|
+
},
|
1605
|
+
{
|
1606
|
+
"body": "Oracle and PostgreSQL supports \"NULLS first/last\" in order by statement. It\nwill break the reverse_sql_order by concating \" DESC\" to the order by statement.\n\nFor example,\n```ruby\n User.order(\"name ASC NULLS FIRST\").last\n```",
|
1607
|
+
"milestone": null,
|
1608
|
+
"labels": [
|
1609
|
+
{
|
1610
|
+
"name": "activerecord",
|
1611
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1612
|
+
"color": "0b02e1"
|
1613
|
+
}
|
1614
|
+
],
|
1615
|
+
"user": {
|
1616
|
+
"gravatar_id": "83c8cca11558f32207645ca270ae8475",
|
1617
|
+
"avatar_url": "https://secure.gravatar.com/avatar/83c8cca11558f32207645ca270ae8475?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1618
|
+
"login": "sishen",
|
1619
|
+
"url": "https://api.github.com/users/sishen",
|
1620
|
+
"id": 11197
|
1621
|
+
},
|
1622
|
+
"closed_at": null,
|
1623
|
+
"created_at": "2012-08-22T18:32:44Z",
|
1624
|
+
"comments": 6,
|
1625
|
+
"title": "ORDER BY xx NULLS first/last will break reverse_sql_order",
|
1626
|
+
"state": "open",
|
1627
|
+
"pull_request": {
|
1628
|
+
"patch_url": "https://github.com/rails/rails/pull/7423.patch",
|
1629
|
+
"html_url": "https://github.com/rails/rails/pull/7423",
|
1630
|
+
"diff_url": "https://github.com/rails/rails/pull/7423.diff"
|
1631
|
+
},
|
1632
|
+
"number": 7423,
|
1633
|
+
"html_url": "https://github.com/rails/rails/issues/7423",
|
1634
|
+
"updated_at": "2012-09-10T01:09:53Z",
|
1635
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7423",
|
1636
|
+
"assignee": null,
|
1637
|
+
"id": 6385066
|
1638
|
+
},
|
1639
|
+
{
|
1640
|
+
"body": "We use the `ActiveRecord::FinderMethods#exists?` method on one of our models in an initializer which registers a Warden callback.\n\n```ruby\nWarden::Manager.after_fetch do |user, auth, opts|\n if MyModel.exists?(:attribute => true)\n # ...\n end\nend\n```\n\nThe problem is that it randomly fails with the following exception: `undefined method 'locked' for #<Class:0x007fdab3025298>`. After the exception occured the first time, no other action can be accessed anymore because the same exception is thrown every time the warden callback is run.\n\nI tried to figure out where the problem occurs and I thinks its [here](https://github.com/rails/rails/blob/v3.2.8/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#L83). But that's a bit strange because it checks if the `arel` object in this case responds to `:locked` before calling it.\n\nHere's the full trace of the exception:\n\n```\nactiverecord (3.2.8) lib/active_record/dynamic_matchers.rb:50:in `method_missing'\nactiverecord (3.2.8) lib/active_record/relation/delegation.rb:14:in `block in locked'\nactiverecord (3.2.8) lib/active_record/relation.rb:241:in `block in scoping'\nactiverecord (3.2.8) lib/active_record/scoping.rb:98:in `with_scope'\nactiverecord (3.2.8) lib/active_record/relation.rb:241:in `scoping'\nactiverecord (3.2.8) lib/active_record/relation/delegation.rb:14:in `locked'\nactiverecord (3.2.8) lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `locked?'\nactiverecord (3.2.8) lib/active_record/connection_adapters/abstract/query_cache.rb:59:in `select_all'\nactiverecord (3.2.8) lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_one'\nactiverecord (3.2.8) lib/active_record/connection_adapters/abstract/database_statements.rb:30:in `select_value'\nactiverecord (3.2.8) lib/active_record/relation/finder_methods.rb:202:in `exists?'\nactiverecord (3.2.8) lib/active_record/querying.rb:5:in `exists?'\nconfig/initializers/warden_callbacks.rb:21:in `block in <top (required)>'\nwarden (1.2.1) lib/warden/hooks.rb:14:in `call'\nwarden (1.2.1) lib/warden/hooks.rb:14:in `block in _run_callbacks'\nwarden (1.2.1) lib/warden/hooks.rb:9:in `each'\nwarden (1.2.1) lib/warden/hooks.rb:9:in `_run_callbacks'\nwarden (1.2.1) lib/warden/manager.rb:53:in `_run_callbacks'\nwarden (1.2.1) lib/warden/proxy.rb:179:in `set_user'\nwarden (1.2.1) lib/warden/proxy.rb:217:in `user'\nwarden (1.2.1) lib/warden/proxy.rb:318:in `_perform_authentication'\nwarden (1.2.1) lib/warden/proxy.rb:127:in `authenticate!'\ndevise (2.1.2) lib/devise/controllers/helpers.rb:48:in `authenticate_user!'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:441:in `block in _run__1781825415374613391__process_action__672509108191995934__callbacks'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_5355'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:326:in `around'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:310:in `_callback_around_13'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_5355'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:414:in `_run__1781825415374613391__process_action__672509108191995934__callbacks'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks'\nactionpack (3.2.8) lib/abstract_controller/callbacks.rb:17:in `process_action'\nactionpack (3.2.8) lib/action_controller/metal/rescue.rb:29:in `process_action'\nactionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'\nactivesupport (3.2.8) lib/active_support/notifications.rb:123:in `block in instrument'\nactivesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'\nactivesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'\nactionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:29:in `process_action'\nactionpack (3.2.8) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'\nactiverecord (3.2.8) lib/active_record/railties/controller_runtime.rb:18:in `process_action'\nactionpack (3.2.8) lib/abstract_controller/base.rb:121:in `process'\nactionpack (3.2.8) lib/abstract_controller/rendering.rb:45:in `process'\nactionpack (3.2.8) lib/action_controller/metal.rb:203:in `dispatch'\nactionpack (3.2.8) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'\nactionpack (3.2.8) lib/action_controller/metal.rb:246:in `block in action'\nactionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `call'\nactionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'\nactionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:36:in `call'\njourney (1.0.4) lib/journey/router.rb:68:in `block in call'\njourney (1.0.4) lib/journey/router.rb:56:in `each'\njourney (1.0.4) lib/journey/router.rb:56:in `call'\nactionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call'\nwarden (1.2.1) lib/warden/manager.rb:35:in `block in call'\nwarden (1.2.1) lib/warden/manager.rb:34:in `catch'\nwarden (1.2.1) lib/warden/manager.rb:34:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'\nrack (1.4.1) lib/rack/etag.rb:23:in `call'\nrack (1.4.1) lib/rack/conditionalget.rb:25:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:in `call'\nrack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'\nrack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:in `call'\nactiverecord (3.2.8) lib/active_record/query_cache.rb:64:in `call'\nactiverecord (3.2.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:405:in `_run__4125333889746358287__call__3170945389804826198__callbacks'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'\nactivesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks'\nactionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:65:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'\nrailties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'\nrailties (3.2.8) lib/rails/rack/logger.rb:14:in `block in call'\nactivesupport (3.2.8) lib/active_support/tagged_logging.rb:25:in `tagged'\nrailties (3.2.8) lib/rails/rack/logger.rb:14:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'\nrack (1.4.1) lib/rack/methodoverride.rb:21:in `call'\nrack (1.4.1) lib/rack/runtime.rb:17:in `call'\nactivesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'\nrack (1.4.1) lib/rack/lock.rb:15:in `call'\nactionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'\nrailties (3.2.8) lib/rails/engine.rb:479:in `call'\nrailties (3.2.8) lib/rails/application.rb:223:in `call'\nrack (1.4.1) lib/rack/content_length.rb:14:in `call'\nrailties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'\nrack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'\n/Users/dvg/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'\n/Users/dvg/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'\n/Users/dvg/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'\n```\nAfter restarting the application the problem disappears.\n\nThe problem occurs in both development and production environments. We're using Rails 3.2.8 with Ruby 1.9.3.",
|
1641
|
+
"milestone": null,
|
1642
|
+
"labels": [
|
1643
|
+
{
|
1644
|
+
"name": "bug",
|
1645
|
+
"url": "https://api.github.com/repos/rails/rails/labels/bug",
|
1646
|
+
"color": "444444"
|
1647
|
+
},
|
1648
|
+
{
|
1649
|
+
"name": "activerecord",
|
1650
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1651
|
+
"color": "0b02e1"
|
1652
|
+
}
|
1653
|
+
],
|
1654
|
+
"user": {
|
1655
|
+
"gravatar_id": "666b6d45bd474eeef66f5a277af58de3",
|
1656
|
+
"avatar_url": "https://secure.gravatar.com/avatar/666b6d45bd474eeef66f5a277af58de3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1657
|
+
"login": "vongruenigen",
|
1658
|
+
"url": "https://api.github.com/users/vongruenigen",
|
1659
|
+
"id": 789513
|
1660
|
+
},
|
1661
|
+
"closed_at": null,
|
1662
|
+
"created_at": "2012-08-22T13:09:40Z",
|
1663
|
+
"comments": 4,
|
1664
|
+
"title": "undefined method 'locked' for #<Class:...>",
|
1665
|
+
"state": "open",
|
1666
|
+
"pull_request": {
|
1667
|
+
"patch_url": null,
|
1668
|
+
"html_url": null,
|
1669
|
+
"diff_url": null
|
1670
|
+
},
|
1671
|
+
"number": 7421,
|
1672
|
+
"html_url": "https://github.com/rails/rails/issues/7421",
|
1673
|
+
"updated_at": "2012-08-24T08:50:19Z",
|
1674
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7421",
|
1675
|
+
"assignee": null,
|
1676
|
+
"id": 6376579
|
1677
|
+
},
|
1678
|
+
{
|
1679
|
+
"body": "I need add to id values with 15 digits, it is id from facebook objects and it is not depent on me. First I changed int to string, it works in browser. But in test with capybara it not work, even if I drop, create and migrate test database once more. So next I will change string to integer but with limit 8 (I'm using mysql)\n\nInstead of this, when I tried saved long number in integer I got duplicate entry error from mysql (strange).\n\nBut what is the problem when I changed id from int to string, in test (after load schema.rb file) id field in sql query was still like integer and schema.rb file not have any information about id type (string). And after changed id to integer with limit 8, schema.rb didn't have information about this too. It is very bad, because after migration id is big int but after load schema id is only integer\n\nSumming up:\nschema.rb are able to create primary key only as integer. it would be grate to support other datatype for primary key",
|
1680
|
+
"milestone": null,
|
1681
|
+
"labels": [
|
1682
|
+
{
|
1683
|
+
"name": "activerecord",
|
1684
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1685
|
+
"color": "0b02e1"
|
1686
|
+
}
|
1687
|
+
],
|
1688
|
+
"user": {
|
1689
|
+
"gravatar_id": "794f638b6f7f5132d5a13230e61c9db2",
|
1690
|
+
"avatar_url": "https://secure.gravatar.com/avatar/794f638b6f7f5132d5a13230e61c9db2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1691
|
+
"login": "wafcio",
|
1692
|
+
"url": "https://api.github.com/users/wafcio",
|
1693
|
+
"id": 945115
|
1694
|
+
},
|
1695
|
+
"closed_at": null,
|
1696
|
+
"created_at": "2012-08-22T12:30:09Z",
|
1697
|
+
"comments": 0,
|
1698
|
+
"title": "Duplicate entry '...' for key 'PRIMARY' for long id field",
|
1699
|
+
"state": "open",
|
1700
|
+
"pull_request": {
|
1701
|
+
"patch_url": null,
|
1702
|
+
"html_url": null,
|
1703
|
+
"diff_url": null
|
1704
|
+
},
|
1705
|
+
"number": 7420,
|
1706
|
+
"html_url": "https://github.com/rails/rails/issues/7420",
|
1707
|
+
"updated_at": "2012-08-22T13:55:50Z",
|
1708
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7420",
|
1709
|
+
"assignee": null,
|
1710
|
+
"id": 6375788
|
1711
|
+
},
|
1712
|
+
{
|
1713
|
+
"body": "ActiveRecord::Associations::Preloader#records_by_reflection uses symbolized association name to find a reflection. If association was defined using string as it's name, model reflections hash would contain that string as a key — so Preloader fails to find that reflection. I think storing symbolized association names in reflections hash is a good solution.\n\nFailing example:\n```ruby\nclass Post < ActiveRecord::Base\n belongs_to \"author\"\nend\n\nclass Author < ActiveRecord::Base\n has_many :posts\nend\n```\n rails> Post.includes(:author).where(:id => 1)\n ActiveRecord::ConfigurationError: Association named 'author' was not found; perhaps you misspelled it?",
|
1714
|
+
"milestone": null,
|
1715
|
+
"labels": [
|
1716
|
+
{
|
1717
|
+
"name": "activerecord",
|
1718
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1719
|
+
"color": "0b02e1"
|
1720
|
+
}
|
1721
|
+
],
|
1722
|
+
"user": {
|
1723
|
+
"gravatar_id": "38da5c11261e71fba3d6d87036c2d5ab",
|
1724
|
+
"avatar_url": "https://secure.gravatar.com/avatar/38da5c11261e71fba3d6d87036c2d5ab?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1725
|
+
"login": "oruen",
|
1726
|
+
"url": "https://api.github.com/users/oruen",
|
1727
|
+
"id": 7712
|
1728
|
+
},
|
1729
|
+
"closed_at": null,
|
1730
|
+
"created_at": "2012-08-22T09:04:23Z",
|
1731
|
+
"comments": 4,
|
1732
|
+
"title": "Using strings in association definition methods breaks eager loading",
|
1733
|
+
"state": "open",
|
1734
|
+
"pull_request": {
|
1735
|
+
"patch_url": "https://github.com/rails/rails/pull/7418.patch",
|
1736
|
+
"html_url": "https://github.com/rails/rails/pull/7418",
|
1737
|
+
"diff_url": "https://github.com/rails/rails/pull/7418.diff"
|
1738
|
+
},
|
1739
|
+
"number": 7418,
|
1740
|
+
"html_url": "https://github.com/rails/rails/issues/7418",
|
1741
|
+
"updated_at": "2012-09-07T11:13:39Z",
|
1742
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7418",
|
1743
|
+
"assignee": null,
|
1744
|
+
"id": 6372449
|
1745
|
+
},
|
1746
|
+
{
|
1747
|
+
"body": "When we run `rake test:benchmark` for performance tests it raises\nArgumentError that file --benchmark not found. It happens because\ngem 'test-unit' passes remaining options to the tests, whereas mintest\ndoesn't do it.",
|
1748
|
+
"milestone": null,
|
1749
|
+
"labels": [
|
1750
|
+
{
|
1751
|
+
"name": "activesupport",
|
1752
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
1753
|
+
"color": "FC9300"
|
1754
|
+
},
|
1755
|
+
{
|
1756
|
+
"name": "railties",
|
1757
|
+
"url": "https://api.github.com/repos/rails/rails/labels/railties",
|
1758
|
+
"color": "8BE06E"
|
1759
|
+
}
|
1760
|
+
],
|
1761
|
+
"user": {
|
1762
|
+
"gravatar_id": "b97b92886055641a956499b3cbb473e6",
|
1763
|
+
"avatar_url": "https://secure.gravatar.com/avatar/b97b92886055641a956499b3cbb473e6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1764
|
+
"login": "route",
|
1765
|
+
"url": "https://api.github.com/users/route",
|
1766
|
+
"id": 414803
|
1767
|
+
},
|
1768
|
+
"closed_at": null,
|
1769
|
+
"created_at": "2012-08-22T07:16:15Z",
|
1770
|
+
"comments": 2,
|
1771
|
+
"title": "#4938 Fix launching performance tests",
|
1772
|
+
"state": "open",
|
1773
|
+
"pull_request": {
|
1774
|
+
"patch_url": "https://github.com/rails/rails/pull/7416.patch",
|
1775
|
+
"html_url": "https://github.com/rails/rails/pull/7416",
|
1776
|
+
"diff_url": "https://github.com/rails/rails/pull/7416.diff"
|
1777
|
+
},
|
1778
|
+
"number": 7416,
|
1779
|
+
"html_url": "https://github.com/rails/rails/issues/7416",
|
1780
|
+
"updated_at": "2012-08-22T16:12:00Z",
|
1781
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7416",
|
1782
|
+
"assignee": null,
|
1783
|
+
"id": 6370745
|
1784
|
+
},
|
1785
|
+
{
|
1786
|
+
"body": "\nIf the host in default_url_options is accidentally set with a protocol such as `:host => \"http://example.com\"` then the generated url will have the protocol twice `http://http://example.com` which is not what the user intended. Likely they wanted to define a host `:host => \"example.com\"` and a `:protocol => \"http://\"` but did not know the convention.\n\nThis is may not the most common problem, but when it happens it can go undetected for a while. I accidentally added `http://` out of habit recently only to find all the links in my emails were broken after deploying a demo site to production. Rather than allow this accident go undetected, we can fix the problem in line by properly setting the protocol and host.\n\n\nI was able to find this related question on stack overflow: http://stackoverflow.com/questions/5878329/rails-3-devise-how-do-i-make-the-email-confirmation-links-use-secure-https-n\n where the answer was highly upvoted. \n\nATP Action Mailer, Actionpack, and Railties",
|
1787
|
+
"milestone": null,
|
1788
|
+
"labels": [
|
1789
|
+
{
|
1790
|
+
"name": "actionmailer",
|
1791
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionmailer",
|
1792
|
+
"color": "8B00FC"
|
1793
|
+
},
|
1794
|
+
{
|
1795
|
+
"name": "actionpack",
|
1796
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
1797
|
+
"color": "FFF700"
|
1798
|
+
}
|
1799
|
+
],
|
1800
|
+
"user": {
|
1801
|
+
"gravatar_id": "db953d125f5cc49756edb6149f1b813e",
|
1802
|
+
"avatar_url": "https://secure.gravatar.com/avatar/db953d125f5cc49756edb6149f1b813e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1803
|
+
"login": "schneems",
|
1804
|
+
"url": "https://api.github.com/users/schneems",
|
1805
|
+
"id": 59744
|
1806
|
+
},
|
1807
|
+
"closed_at": null,
|
1808
|
+
"created_at": "2012-08-22T05:28:53Z",
|
1809
|
+
"comments": 3,
|
1810
|
+
"title": "Fix improperly configured host",
|
1811
|
+
"state": "open",
|
1812
|
+
"pull_request": {
|
1813
|
+
"patch_url": "https://github.com/rails/rails/pull/7415.patch",
|
1814
|
+
"html_url": "https://github.com/rails/rails/pull/7415",
|
1815
|
+
"diff_url": "https://github.com/rails/rails/pull/7415.diff"
|
1816
|
+
},
|
1817
|
+
"number": 7415,
|
1818
|
+
"html_url": "https://github.com/rails/rails/issues/7415",
|
1819
|
+
"updated_at": "2012-08-22T16:03:41Z",
|
1820
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7415",
|
1821
|
+
"assignee": null,
|
1822
|
+
"id": 6369657
|
1823
|
+
},
|
1824
|
+
{
|
1825
|
+
"body": "Here is the scenario:\n\n class Serving\n has_many :constituents\n has_many :nutritions, :through => :constituents\n end\n\n class Constituent\n belongs_to :serving\n belongs_to :nutrition\n attr_accessible :qty_in_grams\n end\n\n class Nutrition\n has_many :constituents\n has_many :servings, :through => constituents\n attr_accessible :calories_per_gram\n end\n\nI want to calculate the total calories for the serving, I naturally do the following query:\n\n Serving.sum { |serving| \n serving.constituents.sum { |constituent| \n constituent.qty_in_grams * constituent.nutrition.calories_per_gram \n } \n }\n\nThis makes a lot of queries, so I use includes to reduce the number of queries down:\n\n Serving.includes(:constituents => :nutrition).sum { |serving| \n serving.constituents.sum { |constituent| \n constituent.qty_in_grams * constituent.nutrition.calories_per_gram \n } \n }\n\nHowever, this doesn't seem to help. Puzzled, and after a lot of fiddling, I make a change that reduces the queries down to 3.\n\n Serving.includes(:constituents => :nutrition).sum { |serving| \n serving.constituents.inject(0) { |memo, constituent| \n memo + (constituent.qty_in_grams * constituent.nutrition.calories_per_gram) \n } \n }\n\nI don't know why ActiveSupport::sum appears to act differently to inject in this case. Is this a bug? (I searched the issue tracker and didn't find any likely suspects.)\n\n**Example logs:**\n\nWith includes and 2 sums:\n\n Serving Load (1.0ms) SELECT \"servings\".* FROM \"servings\" \n Constituent Load (3.0ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)\n Nutrition Load (2.7ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" IN (1, 2, 8, 6, 7, 5, 4, 3, 9, 10, 11, 12, 17, 18, 13, 14, 15, 16, 19, 20, 23, 22, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 33, 35, 36, 37, 38)\n Constituent Load (0.8ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 1 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 2 LIMIT 1\n Constituent Load (1.2ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 2\n Nutrition Load (0.8ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 8 LIMIT 1\n Nutrition Load (0.7ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 6 LIMIT 1\n Nutrition Load (0.7ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 7 LIMIT 1\n Nutrition Load (1.1ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 5 LIMIT 1\n Nutrition Load (0.8ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 4 LIMIT 1\n Nutrition Load (1.2ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 3 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 1 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 9 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 10 LIMIT 1\n Nutrition Load (0.7ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 11 LIMIT 1\n Constituent Load (0.7ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 3\n Nutrition Load (1.2ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 12 LIMIT 1\n Nutrition Load (0.7ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 17 LIMIT 1\n Nutrition Load (1.2ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 18 LIMIT 1\n Constituent Load (1.0ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 4\n Nutrition Load (0.8ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 13 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 14 LIMIT 1\n Nutrition Load (4.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 15 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 16 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 11 LIMIT 1\n Nutrition Load (1.7ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 7 LIMIT 1\n Constituent Load (1.1ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 5\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 19 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 6 LIMIT 1\n Nutrition Load (1.2ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 9 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 7 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 20 LIMIT 1\n Constituent Load (0.9ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 6\n Nutrition Load (1.6ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 23 LIMIT 1\n Nutrition Load (6.5ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 22 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 21 LIMIT 1\n Nutrition Load (6.5ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 24 LIMIT 1\n Constituent Load (1.2ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 7\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 25 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 26 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 27 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 28 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 29 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 30 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 31 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 32 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 34 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 33 LIMIT 1\n Constituent Load (1.2ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 8\n Nutrition Load (5.7ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 25 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 26 LIMIT 1\n Nutrition Load (1.4ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 27 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 28 LIMIT 1\n Nutrition Load (1.1ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 29 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 30 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 31 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 32 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 34 LIMIT 1\n Nutrition Load (7.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 33 LIMIT 1\n Constituent Load (1.0ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 9\n Nutrition Load (1.1ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 23 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 22 LIMIT 1\n Constituent Load (1.1ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 10\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 25 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 26 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 27 LIMIT 1\n Nutrition Load (1.1ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 28 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 29 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 30 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 31 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 32 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 33 LIMIT 1\n Constituent Load (1.0ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 11\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 21 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 35 LIMIT 1\n Nutrition Load (0.9ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 36 LIMIT 1\n Nutrition Load (0.8ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 37 LIMIT 1\n Constituent Load (0.9ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" = 12\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 38 LIMIT 1\n Nutrition Load (1.0ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" = 17 LIMIT 1 \n\nWith includes, 1 sum, 1 inject:\n\n Serving Load (1.0ms) SELECT \"servings\".* FROM \"servings\" \n Constituent Load (3.7ms) SELECT \"constituents\".* FROM \"constituents\" WHERE \"constituents\".\"serving_id\" IN (1, 2, 3, 4, 5, 6 , 7, 8, 9, 10, 11, 12)\n Nutrition Load (3.1ms) SELECT \"nutritions\".* FROM \"nutritions\" WHERE \"nutritions\".\"id\" IN (1, 2, 8, 6, 7, 5, 4, 3, 9, 10, 11, 12, 17, 18, 13, 14, 15, 16, 19, 20, 23, 22, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 33, 35, 36, 37, 38)\n",
|
1826
|
+
"milestone": null,
|
1827
|
+
"labels": [
|
1828
|
+
{
|
1829
|
+
"name": "activerecord",
|
1830
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1831
|
+
"color": "0b02e1"
|
1832
|
+
}
|
1833
|
+
],
|
1834
|
+
"user": {
|
1835
|
+
"gravatar_id": "733212adc953a0d9ebd4038f0cafa4be",
|
1836
|
+
"avatar_url": "https://secure.gravatar.com/avatar/733212adc953a0d9ebd4038f0cafa4be?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1837
|
+
"login": "fierydrake",
|
1838
|
+
"url": "https://api.github.com/users/fierydrake",
|
1839
|
+
"id": 30974
|
1840
|
+
},
|
1841
|
+
"closed_at": null,
|
1842
|
+
"created_at": "2012-08-22T00:11:28Z",
|
1843
|
+
"comments": 1,
|
1844
|
+
"title": "Rails 3.2.8: Use of ActiveSupport::sum causes extra database queries vs inject",
|
1845
|
+
"state": "open",
|
1846
|
+
"pull_request": {
|
1847
|
+
"patch_url": null,
|
1848
|
+
"html_url": null,
|
1849
|
+
"diff_url": null
|
1850
|
+
},
|
1851
|
+
"number": 7411,
|
1852
|
+
"html_url": "https://github.com/rails/rails/issues/7411",
|
1853
|
+
"updated_at": "2012-08-22T00:17:05Z",
|
1854
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7411",
|
1855
|
+
"assignee": null,
|
1856
|
+
"id": 6366451
|
1857
|
+
},
|
1858
|
+
{
|
1859
|
+
"body": "It seems like this could eliminate some annoyances for other people as well. `template0` as I understand it is a pristine database template where the default template to use is` template1` which may include some options. In my case using the new rails-dev-box vagrant setup; `template1` default encoding is SQL_ASCII and raises an error because it conflicts with the UTF-8 option passed in.",
|
1860
|
+
"milestone": null,
|
1861
|
+
"labels": [
|
1862
|
+
|
1863
|
+
],
|
1864
|
+
"user": {
|
1865
|
+
"gravatar_id": "b057dbf404843c93d69e719d4e2dea4b",
|
1866
|
+
"avatar_url": "https://secure.gravatar.com/avatar/b057dbf404843c93d69e719d4e2dea4b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1867
|
+
"login": "bobbyw",
|
1868
|
+
"url": "https://api.github.com/users/bobbyw",
|
1869
|
+
"id": 4330
|
1870
|
+
},
|
1871
|
+
"closed_at": null,
|
1872
|
+
"created_at": "2012-08-20T02:11:46Z",
|
1873
|
+
"comments": 1,
|
1874
|
+
"title": "Use template0 option for creating activerecord test databases in build_database task with postgres",
|
1875
|
+
"state": "open",
|
1876
|
+
"pull_request": {
|
1877
|
+
"patch_url": "https://github.com/rails/rails/pull/7394.patch",
|
1878
|
+
"html_url": "https://github.com/rails/rails/pull/7394",
|
1879
|
+
"diff_url": "https://github.com/rails/rails/pull/7394.diff"
|
1880
|
+
},
|
1881
|
+
"number": 7394,
|
1882
|
+
"html_url": "https://github.com/rails/rails/issues/7394",
|
1883
|
+
"updated_at": "2012-08-20T02:14:55Z",
|
1884
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7394",
|
1885
|
+
"assignee": null,
|
1886
|
+
"id": 6317111
|
1887
|
+
},
|
1888
|
+
{
|
1889
|
+
"body": "rails 3.2.8 / ActiveRecord 3.2.8\nfirst_or_create method is applying given conditions by where to xxx_all methods in model's callbacks. It may be bug?\n\nexample:\n\n class Comment < ActiveRecord::Base\n attr_accessible :enabled, :title\n before_save :diabled_old\n def diabled_old\n self.class.update_all enabled: false\n end\n end\n\n > Comment.where( title: \"x\" ).first_or_create\n SQL (0.1ms) UPDATE \"comments\" SET \"enabled\" = 'f' WHERE \"comments\".\"title\" = 'x'\n SQL (0.2ms) INSERT INTO \"comments\" ...\n\n > Comment.where( title: \"x2\" ).first_or_initialize.save\n SQL (0.1ms) UPDATE \"comments\" SET \"enabled\" = 'f'\n SQL (0.2ms) INSERT INTO \"comments\" ...\n\n > Comment.find_or_create_by_title \"x3\"\n SQL (0.1ms) UPDATE \"comments\" SET \"enabled\" = 'f'\n SQL (0.2ms) INSERT INTO \"comments\" ...\n",
|
1890
|
+
"milestone": null,
|
1891
|
+
"labels": [
|
1892
|
+
{
|
1893
|
+
"name": "activerecord",
|
1894
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1895
|
+
"color": "0b02e1"
|
1896
|
+
},
|
1897
|
+
{
|
1898
|
+
"name": "3-2-stable",
|
1899
|
+
"url": "https://api.github.com/repos/rails/rails/labels/3-2-stable",
|
1900
|
+
"color": "02d7e1"
|
1901
|
+
}
|
1902
|
+
],
|
1903
|
+
"user": {
|
1904
|
+
"gravatar_id": "e6c4fa0f699bd230ff6ba15a35ac3947",
|
1905
|
+
"avatar_url": "https://secure.gravatar.com/avatar/e6c4fa0f699bd230ff6ba15a35ac3947?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1906
|
+
"login": "beyond",
|
1907
|
+
"url": "https://api.github.com/users/beyond",
|
1908
|
+
"id": 68230
|
1909
|
+
},
|
1910
|
+
"closed_at": null,
|
1911
|
+
"created_at": "2012-08-19T02:25:27Z",
|
1912
|
+
"comments": 3,
|
1913
|
+
"title": "first_or_create is applying scope to callbacks.",
|
1914
|
+
"state": "open",
|
1915
|
+
"pull_request": {
|
1916
|
+
"patch_url": null,
|
1917
|
+
"html_url": null,
|
1918
|
+
"diff_url": null
|
1919
|
+
},
|
1920
|
+
"number": 7391,
|
1921
|
+
"html_url": "https://github.com/rails/rails/issues/7391",
|
1922
|
+
"updated_at": "2012-08-21T23:30:38Z",
|
1923
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7391",
|
1924
|
+
"assignee": null,
|
1925
|
+
"id": 6309666
|
1926
|
+
},
|
1927
|
+
{
|
1928
|
+
"body": "\nsee\n\n http://stackoverflow.com/questions/8539207/activerecord-loads-binary-field-incorrectly-on-heroku-fine-on-osx\n\n https://gist.github.com/3382094\n\n https://devcenter.heroku.com/articles/heroku-postgresql#troubleshooting\n\nto try to understand the issue this works around.\n\nessentially, under certain conditions, PGconn.unescape_bytea is returning bunk/different data. this feature detects the situation and corrects it on the fly.",
|
1929
|
+
"milestone": null,
|
1930
|
+
"labels": [
|
1931
|
+
{
|
1932
|
+
"name": "activerecord",
|
1933
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1934
|
+
"color": "0b02e1"
|
1935
|
+
}
|
1936
|
+
],
|
1937
|
+
"user": {
|
1938
|
+
"gravatar_id": "1bac2e65d64faf472cf2ebc94f0f5ee0",
|
1939
|
+
"avatar_url": "https://secure.gravatar.com/avatar/1bac2e65d64faf472cf2ebc94f0f5ee0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1940
|
+
"login": "ahoward",
|
1941
|
+
"url": "https://api.github.com/users/ahoward",
|
1942
|
+
"id": 6094
|
1943
|
+
},
|
1944
|
+
"closed_at": null,
|
1945
|
+
"created_at": "2012-08-17T22:23:21Z",
|
1946
|
+
"comments": 0,
|
1947
|
+
"title": "handle freaky (heroku) bytea configurations",
|
1948
|
+
"state": "open",
|
1949
|
+
"pull_request": {
|
1950
|
+
"patch_url": "https://github.com/rails/rails/pull/7383.patch",
|
1951
|
+
"html_url": "https://github.com/rails/rails/pull/7383",
|
1952
|
+
"diff_url": "https://github.com/rails/rails/pull/7383.diff"
|
1953
|
+
},
|
1954
|
+
"number": 7383,
|
1955
|
+
"html_url": "https://github.com/rails/rails/issues/7383",
|
1956
|
+
"updated_at": "2012-08-17T22:23:21Z",
|
1957
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7383",
|
1958
|
+
"assignee": null,
|
1959
|
+
"id": 6300418
|
1960
|
+
},
|
1961
|
+
{
|
1962
|
+
"body": "When you add one callack in two separate `set_callback` calls - it is only called once.\n\nWhen you do it in one `set_callback` call - it is called twice.\n\nThis violates the principle of least astonishment for me. Duplicating callback is usually an error. There is a correct and obvious way to do anything without this \"feature\".\n\nIf you want to do:\n\n```ruby\nbefore_save :clear_balance, :calculate_tax, :clear_balance\n```\n\nor whatever, you should better do:\n\n```ruby\nbefore_save :carefully_calculate_tax\n\ndef carefully_calculate_tax\n clear_balance\n calculate_tax\n clear_balance\nend\n```\n\nAnd this even opens gates for some advanced refactorings, unlike the first approach.\n\nMy assumptions are:\n\n- Principle of least astonishment is violated, when callbacks are either prevented from duplication, or not.\n- Duplicating callbacks is usually an error. When it is intentional - it's a smell of a bad design and can be approached without abusing this \"feature\".\n\nMy suggestion is: do not allow duplicating callbacks in one callback call, like it is not allowed in separate callbacks call.\n\nP.S. It's currently one test on railties failing in __master__ and so in this branch __also__. It's not me!\n\n```\n 1) Failure:\ntest_0006_reload constants on development(LoadingTest) [test/application/loading_test.rb:135]:\nExpected: \"2\"\n Actual: \"1\"\n```",
|
1963
|
+
"milestone": null,
|
1964
|
+
"labels": [
|
1965
|
+
{
|
1966
|
+
"name": "activerecord",
|
1967
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
1968
|
+
"color": "0b02e1"
|
1969
|
+
}
|
1970
|
+
],
|
1971
|
+
"user": {
|
1972
|
+
"gravatar_id": "c4486876726bcef5b87268564fc29e6c",
|
1973
|
+
"avatar_url": "https://secure.gravatar.com/avatar/c4486876726bcef5b87268564fc29e6c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
1974
|
+
"login": "dmitriy-kiriyenko",
|
1975
|
+
"url": "https://api.github.com/users/dmitriy-kiriyenko",
|
1976
|
+
"id": 124430
|
1977
|
+
},
|
1978
|
+
"closed_at": null,
|
1979
|
+
"created_at": "2012-08-17T12:41:21Z",
|
1980
|
+
"comments": 0,
|
1981
|
+
"title": "Prevent callback from being set twice.",
|
1982
|
+
"state": "open",
|
1983
|
+
"pull_request": {
|
1984
|
+
"patch_url": "https://github.com/rails/rails/pull/7376.patch",
|
1985
|
+
"html_url": "https://github.com/rails/rails/pull/7376",
|
1986
|
+
"diff_url": "https://github.com/rails/rails/pull/7376.diff"
|
1987
|
+
},
|
1988
|
+
"number": 7376,
|
1989
|
+
"html_url": "https://github.com/rails/rails/issues/7376",
|
1990
|
+
"updated_at": "2012-08-17T12:41:21Z",
|
1991
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7376",
|
1992
|
+
"assignee": null,
|
1993
|
+
"id": 6288318
|
1994
|
+
},
|
1995
|
+
{
|
1996
|
+
"body": "I have the following in development.rb:\n\n```ruby\nconfig.cache_store = :null_store\n```\n\nand the following in a User class:\n\n```ruby\ndef cached_profile\n Rails.cache.fetch(\"user_#{self.id}_profile\") { self.profile }\nend\n```\n\nWhenever the code reaches this point, I get the following error:\n\n```ruby\nno _dump_data is defined for class Proc\n```\n\nThe error goes away if I'm starting a memcached server and I change the cache_store. Why is this appearing on a dev environment? Shouldn't a cache miss be performed all the time if we specify that we're using a null_store?",
|
1997
|
+
"milestone": null,
|
1998
|
+
"labels": [
|
1999
|
+
{
|
2000
|
+
"name": "activesupport",
|
2001
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
2002
|
+
"color": "FC9300"
|
2003
|
+
}
|
2004
|
+
],
|
2005
|
+
"user": {
|
2006
|
+
"gravatar_id": "20571f32acd27d2cf5f1b1f42ea1a75b",
|
2007
|
+
"avatar_url": "https://secure.gravatar.com/avatar/20571f32acd27d2cf5f1b1f42ea1a75b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2008
|
+
"login": "International",
|
2009
|
+
"url": "https://api.github.com/users/International",
|
2010
|
+
"id": 1022918
|
2011
|
+
},
|
2012
|
+
"closed_at": null,
|
2013
|
+
"created_at": "2012-08-17T10:58:38Z",
|
2014
|
+
"comments": 9,
|
2015
|
+
"title": "no _dump_data is defined for class Proc",
|
2016
|
+
"state": "open",
|
2017
|
+
"pull_request": {
|
2018
|
+
"patch_url": null,
|
2019
|
+
"html_url": null,
|
2020
|
+
"diff_url": null
|
2021
|
+
},
|
2022
|
+
"number": 7375,
|
2023
|
+
"html_url": "https://github.com/rails/rails/issues/7375",
|
2024
|
+
"updated_at": "2012-09-10T03:31:46Z",
|
2025
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7375",
|
2026
|
+
"assignee": null,
|
2027
|
+
"id": 6286886
|
2028
|
+
},
|
2029
|
+
{
|
2030
|
+
"body": "Rack::Session::Cookie accepts a :secret option in its initializer. The initializer stores that secret in an instance variable and uses it in the `#set_session` method to HMAC sign the data.\n\nRack HEAD added security warnings for when the Rack::Session::Cookie middleware is initialized without a secret. \n\nThis is causing the warning to show up because of the way Rails uses Rack::Session::Cookie:\n\nRails uses a subclass of Rack::Session::Cookie called ActionDispatch::Session::CookieStore that overwrites `#set_session` and `#set_cookie` to do its own signed cookie implementation using ActionDispatch::Cookies::SignedCookieJar (using Rack env `\"action_dispatch.secret_token\"` instead of the `@secret` instance variable). Since Rails doesn't need the `@secret` instance variable, it initializes ActionDispatch::Session::CookieStore without providing a :secret option.\n\nTo avoid the warning, we should just not use Rack::Session::Cookie. We're overriding a lot of the functionality for Rack::Session::Cookie anyway, to the point that its most important functionality (cookie signing) is not being used at all.",
|
2031
|
+
"milestone": null,
|
2032
|
+
"labels": [
|
2033
|
+
{
|
2034
|
+
"name": "actionpack",
|
2035
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
2036
|
+
"color": "FFF700"
|
2037
|
+
}
|
2038
|
+
],
|
2039
|
+
"user": {
|
2040
|
+
"gravatar_id": "139de3f8c3d6ee008cdb3abd3da23908",
|
2041
|
+
"avatar_url": "https://secure.gravatar.com/avatar/139de3f8c3d6ee008cdb3abd3da23908?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2042
|
+
"login": "dlee",
|
2043
|
+
"url": "https://api.github.com/users/dlee",
|
2044
|
+
"id": 7035
|
2045
|
+
},
|
2046
|
+
"closed_at": null,
|
2047
|
+
"created_at": "2012-08-16T23:24:58Z",
|
2048
|
+
"comments": 0,
|
2049
|
+
"title": "Using Rack HEAD causes CookieStore security warnings",
|
2050
|
+
"state": "open",
|
2051
|
+
"pull_request": {
|
2052
|
+
"patch_url": null,
|
2053
|
+
"html_url": null,
|
2054
|
+
"diff_url": null
|
2055
|
+
},
|
2056
|
+
"number": 7372,
|
2057
|
+
"html_url": "https://github.com/rails/rails/issues/7372",
|
2058
|
+
"updated_at": "2012-08-16T23:24:58Z",
|
2059
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7372",
|
2060
|
+
"assignee": null,
|
2061
|
+
"id": 6278190
|
2062
|
+
},
|
2063
|
+
{
|
2064
|
+
"body": "Call super to nullify the reference to the original errors object in the dup'ed object (call ActiveModel::Validations#initialize_dup)",
|
2065
|
+
"milestone": null,
|
2066
|
+
"labels": [
|
2067
|
+
{
|
2068
|
+
"name": "activerecord",
|
2069
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2070
|
+
"color": "0b02e1"
|
2071
|
+
}
|
2072
|
+
],
|
2073
|
+
"user": {
|
2074
|
+
"gravatar_id": "2b4e5507d94dc84a187d35c2884c0f3d",
|
2075
|
+
"avatar_url": "https://secure.gravatar.com/avatar/2b4e5507d94dc84a187d35c2884c0f3d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2076
|
+
"login": "csmuc",
|
2077
|
+
"url": "https://api.github.com/users/csmuc",
|
2078
|
+
"id": 16403
|
2079
|
+
},
|
2080
|
+
"closed_at": null,
|
2081
|
+
"created_at": "2012-08-16T21:25:35Z",
|
2082
|
+
"comments": 3,
|
2083
|
+
"title": "Dup'ed ActiveRecord objects may not share the errors object ",
|
2084
|
+
"state": "open",
|
2085
|
+
"pull_request": {
|
2086
|
+
"patch_url": "https://github.com/rails/rails/pull/7371.patch",
|
2087
|
+
"html_url": "https://github.com/rails/rails/pull/7371",
|
2088
|
+
"diff_url": "https://github.com/rails/rails/pull/7371.diff"
|
2089
|
+
},
|
2090
|
+
"number": 7371,
|
2091
|
+
"html_url": "https://github.com/rails/rails/issues/7371",
|
2092
|
+
"updated_at": "2012-08-17T20:47:25Z",
|
2093
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7371",
|
2094
|
+
"assignee": null,
|
2095
|
+
"id": 6275778
|
2096
|
+
},
|
2097
|
+
{
|
2098
|
+
"body": "First place lookup is now: errors.formats.attributes.#{attribute}\n\nExample use case:\n\n errors:\n attributes:\n last_name:\n blank: you must provide your full name\n formats:\n attributes:\n last_name: \"%{message}\"\n\n(same fallbacks as before)",
|
2099
|
+
"milestone": null,
|
2100
|
+
"labels": [
|
2101
|
+
{
|
2102
|
+
"name": "activemodel",
|
2103
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activemodel",
|
2104
|
+
"color": "00E5FF"
|
2105
|
+
}
|
2106
|
+
],
|
2107
|
+
"user": {
|
2108
|
+
"gravatar_id": "d6566c8ab911742cfe124b96c44503fe",
|
2109
|
+
"avatar_url": "https://secure.gravatar.com/avatar/d6566c8ab911742cfe124b96c44503fe?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2110
|
+
"login": "ey-pairing",
|
2111
|
+
"url": "https://api.github.com/users/ey-pairing",
|
2112
|
+
"id": 296012
|
2113
|
+
},
|
2114
|
+
"closed_at": null,
|
2115
|
+
"created_at": "2012-08-16T18:14:39Z",
|
2116
|
+
"comments": 5,
|
2117
|
+
"title": "i18n error messages: custom formats by attribute",
|
2118
|
+
"state": "open",
|
2119
|
+
"pull_request": {
|
2120
|
+
"patch_url": "https://github.com/rails/rails/pull/7369.patch",
|
2121
|
+
"html_url": "https://github.com/rails/rails/pull/7369",
|
2122
|
+
"diff_url": "https://github.com/rails/rails/pull/7369.diff"
|
2123
|
+
},
|
2124
|
+
"number": 7369,
|
2125
|
+
"html_url": "https://github.com/rails/rails/issues/7369",
|
2126
|
+
"updated_at": "2012-08-16T18:52:10Z",
|
2127
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7369",
|
2128
|
+
"assignee": null,
|
2129
|
+
"id": 6271177
|
2130
|
+
},
|
2131
|
+
{
|
2132
|
+
"body": "This change fixes issue #3512\n\nAny suggestion on how to improve the detail definition?\n\nAlso, the test is changing global state (because it's including the Fallback module), I can change it to stub the `.fallbacks` method if you think that's better (or any other change also).\n\nThanks!",
|
2133
|
+
"milestone": null,
|
2134
|
+
"labels": [
|
2135
|
+
{
|
2136
|
+
"name": "actionview",
|
2137
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionview",
|
2138
|
+
"color": "d7e102"
|
2139
|
+
}
|
2140
|
+
],
|
2141
|
+
"user": {
|
2142
|
+
"gravatar_id": "0202412b1521743707add51b2ad34a10",
|
2143
|
+
"avatar_url": "https://secure.gravatar.com/avatar/0202412b1521743707add51b2ad34a10?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2144
|
+
"login": "jbarreneche",
|
2145
|
+
"url": "https://api.github.com/users/jbarreneche",
|
2146
|
+
"id": 98871
|
2147
|
+
},
|
2148
|
+
"closed_at": null,
|
2149
|
+
"created_at": "2012-08-16T18:13:19Z",
|
2150
|
+
"comments": 4,
|
2151
|
+
"title": "i18n locale fallback for localized views",
|
2152
|
+
"state": "open",
|
2153
|
+
"pull_request": {
|
2154
|
+
"patch_url": "https://github.com/rails/rails/pull/7368.patch",
|
2155
|
+
"html_url": "https://github.com/rails/rails/pull/7368",
|
2156
|
+
"diff_url": "https://github.com/rails/rails/pull/7368.diff"
|
2157
|
+
},
|
2158
|
+
"number": 7368,
|
2159
|
+
"html_url": "https://github.com/rails/rails/issues/7368",
|
2160
|
+
"updated_at": "2012-08-17T20:57:23Z",
|
2161
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7368",
|
2162
|
+
"assignee": null,
|
2163
|
+
"id": 6271144
|
2164
|
+
},
|
2165
|
+
{
|
2166
|
+
"body": "I have a relationship where a user has_many sites, i have a counter_cache on this relationship.\n\nTesting in the console with the following:\n\nuser = User.find 1\nputs user.sites.size\nputs user.sites.count\n\nWhen calling .size on the collection, it will not trigger any SQL and correctly use the users.sites_count column. However, calling collection.count does trigger a select count(*) when it is not really needed.\n\nThis may be intended I guess due to the nature of the active record query interface where all methods like order/uniq/where etc will trigger sql. Perhaps I missed some documentation somewhere, but it does seem odd to me. I had to whip through all my code making sure I'm calling .size() instead of .count() in the correct places.\n\nIn fact I may as well just always call .size() since if there is no counter_cache then it will figure it out. The only time you can't is when you are chaining an active record query together.",
|
2167
|
+
"milestone": null,
|
2168
|
+
"labels": [
|
2169
|
+
{
|
2170
|
+
"name": "activerecord",
|
2171
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2172
|
+
"color": "0b02e1"
|
2173
|
+
}
|
2174
|
+
],
|
2175
|
+
"user": {
|
2176
|
+
"gravatar_id": "4c4c3a1dea0b9b33f9c09cab404ba486",
|
2177
|
+
"avatar_url": "https://secure.gravatar.com/avatar/4c4c3a1dea0b9b33f9c09cab404ba486?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2178
|
+
"login": "tigris",
|
2179
|
+
"url": "https://api.github.com/users/tigris",
|
2180
|
+
"id": 26856
|
2181
|
+
},
|
2182
|
+
"closed_at": null,
|
2183
|
+
"created_at": "2012-08-16T17:36:45Z",
|
2184
|
+
"comments": 2,
|
2185
|
+
"title": "Collection.count not using counter_cache",
|
2186
|
+
"state": "open",
|
2187
|
+
"pull_request": {
|
2188
|
+
"patch_url": null,
|
2189
|
+
"html_url": null,
|
2190
|
+
"diff_url": null
|
2191
|
+
},
|
2192
|
+
"number": 7367,
|
2193
|
+
"html_url": "https://github.com/rails/rails/issues/7367",
|
2194
|
+
"updated_at": "2012-08-17T16:51:15Z",
|
2195
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7367",
|
2196
|
+
"assignee": null,
|
2197
|
+
"id": 6270318
|
2198
|
+
},
|
2199
|
+
{
|
2200
|
+
"body": "This issue exists since 3.0 (a backport would be nice if it gets fixed)\n\n```Ruby\nclass Car < ActiveRecord::Base\n scope :good, where(:id => 1)\n scope :bad, where(:id => 2)\nend\n\n# using scopes\nCar.good.bad\nSELECT \"cars\".* FROM \"cars\" WHERE \"cars\".\"id\" = 2\n\n# using wheres\nCar.where(:id => 1).where(:id => 2)\nSELECT \"cars\".* FROM \"cars\" WHERE \"cars\".\"id\" = 1 AND \"cars\".\"id\" = 2\n```\nDoes the same for different attributes, especially annoying when you do logic like `id => [1,2,3] + id => [2,3,4]` and expect only 2 to get returned\n\n\n",
|
2201
|
+
"milestone": null,
|
2202
|
+
"labels": [
|
2203
|
+
{
|
2204
|
+
"name": "activerecord",
|
2205
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2206
|
+
"color": "0b02e1"
|
2207
|
+
}
|
2208
|
+
],
|
2209
|
+
"user": {
|
2210
|
+
"gravatar_id": "59436ecd4fe6ad7c34f67654d839f05f",
|
2211
|
+
"avatar_url": "https://secure.gravatar.com/avatar/59436ecd4fe6ad7c34f67654d839f05f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2212
|
+
"login": "grosser",
|
2213
|
+
"url": "https://api.github.com/users/grosser",
|
2214
|
+
"id": 11367
|
2215
|
+
},
|
2216
|
+
"closed_at": null,
|
2217
|
+
"created_at": "2012-08-16T17:01:00Z",
|
2218
|
+
"comments": 1,
|
2219
|
+
"title": "scopes combine conditions on same attribute incorrectly ",
|
2220
|
+
"state": "open",
|
2221
|
+
"pull_request": {
|
2222
|
+
"patch_url": null,
|
2223
|
+
"html_url": null,
|
2224
|
+
"diff_url": null
|
2225
|
+
},
|
2226
|
+
"number": 7365,
|
2227
|
+
"html_url": "https://github.com/rails/rails/issues/7365",
|
2228
|
+
"updated_at": "2012-08-26T21:55:17Z",
|
2229
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7365",
|
2230
|
+
"assignee": null,
|
2231
|
+
"id": 6269582
|
2232
|
+
},
|
2233
|
+
{
|
2234
|
+
"body": "Posted this on SO: http://stackoverflow.com/questions/11889922/rails-append-not-adding-object-to-has-many-through\n\nI'm getting weird behavior when trying to add objects via a has_many :through relationship.\n\nMy models:\n \n Class Player < ActiveRecord::Base\n has_many :player_to_team_histories\n has_many :team_histories, through: :player_to_team_histories\n end\n Class TeamHistory < ActiveRecord::Base\n has_many :player_to_team_histories\n has_many :players, through: :player_to_team_histories\n end\n\nThe code:\n\n >>p = Player.first\n >>p.team_histories.count\n 0\n >>p.team_histories.append TeamHistory.create\n >>p.team_histories.count\n 0\n >>p.team_histories.push TeamHistory.create\n >>p.team_histories.count\n 1\n >>p.team_histories << TeamHistory.create\n >>p.team_histories.count\n 2\n\nWhy does `append` not add the newly created `TeamHistory` to the `team_histories` array?\n\nI'm using Ruby 1.9.2.\n\nThere is no documentation about the `append` method for `ActiveRecord`. Was `append` intentionally left out?\n",
|
2235
|
+
"milestone": null,
|
2236
|
+
"labels": [
|
2237
|
+
{
|
2238
|
+
"name": "activerecord",
|
2239
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2240
|
+
"color": "0b02e1"
|
2241
|
+
}
|
2242
|
+
],
|
2243
|
+
"user": {
|
2244
|
+
"gravatar_id": "1fda4e5d37f665b1b15951b91b10878f",
|
2245
|
+
"avatar_url": "https://secure.gravatar.com/avatar/1fda4e5d37f665b1b15951b91b10878f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2246
|
+
"login": "workmaster2n",
|
2247
|
+
"url": "https://api.github.com/users/workmaster2n",
|
2248
|
+
"id": 1417309
|
2249
|
+
},
|
2250
|
+
"closed_at": null,
|
2251
|
+
"created_at": "2012-08-16T16:56:31Z",
|
2252
|
+
"comments": 2,
|
2253
|
+
"title": "Rails append not adding object to has_many :through",
|
2254
|
+
"state": "open",
|
2255
|
+
"pull_request": {
|
2256
|
+
"patch_url": null,
|
2257
|
+
"html_url": null,
|
2258
|
+
"diff_url": null
|
2259
|
+
},
|
2260
|
+
"number": 7364,
|
2261
|
+
"html_url": "https://github.com/rails/rails/issues/7364",
|
2262
|
+
"updated_at": "2012-08-19T20:31:50Z",
|
2263
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7364",
|
2264
|
+
"assignee": null,
|
2265
|
+
"id": 6269498
|
2266
|
+
},
|
2267
|
+
{
|
2268
|
+
"body": "Rails 3.2.8, ruby 1.9.3-p194\nLinux somename 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux\n\n 1.9.3 (main):0 > time = Time.now\n => 2012-08-16 12:24:01 +0400\n 1.9.3 (main):0 > time.utc.in_time_zone(ActiveSupport::TimeZone[0])\n => Thu, 16 Aug 2012 09:24:01 WEST +01:00\n 1.9.3 (main):0 > Time.utc(time.to_i).in_time_zone(ActiveSupport::TimeZone[0])\n => Fri, 01 Jan 1345105441 00:00:00 WET +00:00\n\n 1.9.3 (main):0 > time = Time.now\n => 2012-08-16 12:26:39 +0400\n 1.9.3 (main):0 > zone = ::Time.find_zone!(ActiveSupport::TimeZone[0])\n => (GMT+00:00) Casablanca\n 1.9.3 (main):0 > ActiveSupport::TimeWithZone.new(time, zone)\n => Thu, 16 Aug 2012 13:26:39 WEST +01:00\n 1.9.3 (main):0 > ActiveSupport::TimeWithZone.new(time, zone).period\n => #<TZInfo::TimezonePeriod: #<TZInfo::TimezoneTransitionInfo: #<TZInfo::TimeOrDateTime: 1335664800>,#<TZInfo::TimezoneOffsetInfo: 0,3600,WEST>>,#<TZInfo::TimezoneTransitionInfo: #<TZInfo::TimeOrDateTime: 1348970400>,#<TZInfo::TimezoneOffsetInfo: 0,0,WET>>>\n 1.9.3 (main):0 > zone.period_for_utc(nil)\n => #<TZInfo::TimezonePeriod: #<TZInfo::TimezoneTransitionInfo: #<TZInfo::TimeOrDateTime: Sat, 30 Sep 1967 23:00:00 +0000>,#<TZInfo::TimezoneOffsetInfo: 0,0,WET>>,#<TZInfo::TimezoneTransitionInfo: #<TZInfo::TimeOrDateTime: 141264000>,#<TZInfo::TimezoneOffsetInfo: 0,3600,WEST>>>\n\nInpropriate order seems suspicious. The only thing working correctly for DateTime object or ActiveSupport::TimeWithZone object is:\n\n seconds = 14400\n not_time = Somemodel.last.measured_at\n => Thu, 16 Aug 2012 10:10:00 UTC +00:00\n not_time.to_time.getlocal(seconds)\n => 2012-08-16 14:10:00 +0400\n\n",
|
2269
|
+
"milestone": null,
|
2270
|
+
"labels": [
|
2271
|
+
{
|
2272
|
+
"name": "activesupport",
|
2273
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
2274
|
+
"color": "FC9300"
|
2275
|
+
}
|
2276
|
+
],
|
2277
|
+
"user": {
|
2278
|
+
"gravatar_id": "66bb6f8eee55156c9afbc62d178eb342",
|
2279
|
+
"avatar_url": "https://secure.gravatar.com/avatar/66bb6f8eee55156c9afbc62d178eb342?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2280
|
+
"login": "Antiarchitect",
|
2281
|
+
"url": "https://api.github.com/users/Antiarchitect",
|
2282
|
+
"id": 50209
|
2283
|
+
},
|
2284
|
+
"closed_at": null,
|
2285
|
+
"created_at": "2012-08-16T08:28:52Z",
|
2286
|
+
"comments": 2,
|
2287
|
+
"title": "ActiveSupport::TimeWithZone.new works incorrect.",
|
2288
|
+
"state": "open",
|
2289
|
+
"pull_request": {
|
2290
|
+
"patch_url": null,
|
2291
|
+
"html_url": null,
|
2292
|
+
"diff_url": null
|
2293
|
+
},
|
2294
|
+
"number": 7361,
|
2295
|
+
"html_url": "https://github.com/rails/rails/issues/7361",
|
2296
|
+
"updated_at": "2012-08-16T10:29:32Z",
|
2297
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7361",
|
2298
|
+
"assignee": null,
|
2299
|
+
"id": 6259217
|
2300
|
+
},
|
2301
|
+
{
|
2302
|
+
"body": "This will omit the first divider in grouped_options_for_select (I would\nexpect a divider to go between things only).\n\nCurrently, the grouped options divider will make a select like so:\n<pre>\nPlease Select:\n-----\nUSA\nCanada\n-----\nDenmark\nUnited Kingdom\n-----\nChina\nIndia\n</pre>\nIt is more symmetric and more typical to only seperate the groups:\n<pre>\nPlease Select:\n\nUSA\nCanada\n-----\nDenmark\nUnited Kingdom\n-----\nChina\nIndia\n</pre>",
|
2303
|
+
"milestone": null,
|
2304
|
+
"labels": [
|
2305
|
+
{
|
2306
|
+
"name": "actionview",
|
2307
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionview",
|
2308
|
+
"color": "d7e102"
|
2309
|
+
}
|
2310
|
+
],
|
2311
|
+
"user": {
|
2312
|
+
"gravatar_id": "bb4976df206152ce93aad43f1eb8faa0",
|
2313
|
+
"avatar_url": "https://secure.gravatar.com/avatar/bb4976df206152ce93aad43f1eb8faa0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2314
|
+
"login": "evanfarrar",
|
2315
|
+
"url": "https://api.github.com/users/evanfarrar",
|
2316
|
+
"id": 7092
|
2317
|
+
},
|
2318
|
+
"closed_at": null,
|
2319
|
+
"created_at": "2012-08-16T00:37:15Z",
|
2320
|
+
"comments": 3,
|
2321
|
+
"title": "Remove leading divider from grouped_options_for_select when divider option is passed",
|
2322
|
+
"state": "open",
|
2323
|
+
"pull_request": {
|
2324
|
+
"patch_url": "https://github.com/rails/rails/pull/7360.patch",
|
2325
|
+
"html_url": "https://github.com/rails/rails/pull/7360",
|
2326
|
+
"diff_url": "https://github.com/rails/rails/pull/7360.diff"
|
2327
|
+
},
|
2328
|
+
"number": 7360,
|
2329
|
+
"html_url": "https://github.com/rails/rails/issues/7360",
|
2330
|
+
"updated_at": "2012-08-16T00:58:20Z",
|
2331
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7360",
|
2332
|
+
"assignee": null,
|
2333
|
+
"id": 6254701
|
2334
|
+
},
|
2335
|
+
{
|
2336
|
+
"body": "Date, DateTime, Time and TimeWithZone can now be compared to infinity,\n so it's now possible to create ranges with one infinite bound and\n date/time object as another bound.\n\n Ex.: @range = Range.new(Date.today, Float::INFINITY)\n\nAlso it's possible to check inclusion of date/time in range with\n conversion.\n\n Ex.: @range.include?(Time.now + 1.year) # => true\n @range.include?(DateTime.now + 1.year) # => true\n\nAbility to create date/time ranges with infinite bound is required\n for handling postgresql range types.\n\nAlso it gives ability to create ranges from Time.now to Date.today + 10.years",
|
2337
|
+
"milestone": null,
|
2338
|
+
"labels": [
|
2339
|
+
{
|
2340
|
+
"name": "activesupport",
|
2341
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
2342
|
+
"color": "FC9300"
|
2343
|
+
}
|
2344
|
+
],
|
2345
|
+
"user": {
|
2346
|
+
"gravatar_id": "ce5d1a4d26241d16575889a6f1ed4487",
|
2347
|
+
"avatar_url": "https://secure.gravatar.com/avatar/ce5d1a4d26241d16575889a6f1ed4487?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2348
|
+
"login": "slbug",
|
2349
|
+
"url": "https://api.github.com/users/slbug",
|
2350
|
+
"id": 108694
|
2351
|
+
},
|
2352
|
+
"closed_at": null,
|
2353
|
+
"created_at": "2012-08-14T18:34:39Z",
|
2354
|
+
"comments": 4,
|
2355
|
+
"title": "Added ability to compare date/time with infinity",
|
2356
|
+
"state": "open",
|
2357
|
+
"pull_request": {
|
2358
|
+
"patch_url": "https://github.com/rails/rails/pull/7350.patch",
|
2359
|
+
"html_url": "https://github.com/rails/rails/pull/7350",
|
2360
|
+
"diff_url": "https://github.com/rails/rails/pull/7350.diff"
|
2361
|
+
},
|
2362
|
+
"number": 7350,
|
2363
|
+
"html_url": "https://github.com/rails/rails/issues/7350",
|
2364
|
+
"updated_at": "2012-08-21T21:11:45Z",
|
2365
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7350",
|
2366
|
+
"assignee": null,
|
2367
|
+
"id": 6223527
|
2368
|
+
},
|
2369
|
+
{
|
2370
|
+
"body": "It seems logical to treat incompatibly marshaled data the same way as unsigned. This would fix issues like #2509 when class signature changes or serializer gets replaced. Motivation for changing session secret hash should not be connected to changes in implementation details of flash or session serialization.",
|
2371
|
+
"milestone": null,
|
2372
|
+
"labels": [
|
2373
|
+
{
|
2374
|
+
"name": "activesupport",
|
2375
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
2376
|
+
"color": "FC9300"
|
2377
|
+
}
|
2378
|
+
],
|
2379
|
+
"user": {
|
2380
|
+
"gravatar_id": "8cf18195d36be3f774344820b1302c62",
|
2381
|
+
"avatar_url": "https://secure.gravatar.com/avatar/8cf18195d36be3f774344820b1302c62?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2382
|
+
"login": "bgipsy",
|
2383
|
+
"url": "https://api.github.com/users/bgipsy",
|
2384
|
+
"id": 90239
|
2385
|
+
},
|
2386
|
+
"closed_at": null,
|
2387
|
+
"created_at": "2012-08-14T12:03:05Z",
|
2388
|
+
"comments": 6,
|
2389
|
+
"title": "Format errors should not crash MessageVerifier",
|
2390
|
+
"state": "open",
|
2391
|
+
"pull_request": {
|
2392
|
+
"patch_url": "https://github.com/rails/rails/pull/7348.patch",
|
2393
|
+
"html_url": "https://github.com/rails/rails/pull/7348",
|
2394
|
+
"diff_url": "https://github.com/rails/rails/pull/7348.diff"
|
2395
|
+
},
|
2396
|
+
"number": 7348,
|
2397
|
+
"html_url": "https://github.com/rails/rails/issues/7348",
|
2398
|
+
"updated_at": "2012-09-04T16:19:54Z",
|
2399
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7348",
|
2400
|
+
"assignee": null,
|
2401
|
+
"id": 6214247
|
2402
|
+
},
|
2403
|
+
{
|
2404
|
+
"body": "In my app, I rely on mark_for_destruction removing records before adding new ones due to a unique index on the table. Starting with 3.2.7, the order of execution is not honored.\n\nThis commit looks to be the culprit: https://github.com/rails/rails/commit/b1e509ad7a8c8264544f10f4666705cd806b5408?w=0\n\n```ruby\n#replace fees\nreservation.reservation_fees.each(&:mark_for_destruction)\nrate[:fees].each { |fee| reservation.reservation_fees.build(fee) }\n```\n\n3.2.6\n```\n SQL (0.5ms) DELETE FROM \"reservation_fees\" WHERE \"reservation_fees\".\"id\" = $1 [[\"id\", 49944]]\n SQL (0.1ms) DELETE FROM \"reservation_fees\" WHERE \"reservation_fees\".\"id\" = $1 [[\"id\", 49943]]\n SQL (0.1ms) DELETE FROM \"reservation_fees\" WHERE \"reservation_fees\".\"id\" = $1 [[\"id\", 49942]]\n SQL (0.1ms) DELETE FROM \"reservation_fees\" WHERE \"reservation_fees\".\"id\" = $1 [[\"id\", 49941]]\n SQL (0.1ms) DELETE FROM \"reservation_fees\" WHERE \"reservation_fees\".\"id\" = $1 [[\"id\", 49940]]\n SQL (1.8ms) INSERT INTO \"reservation_fees\" (\"amount\", \"code\", \"created_at\", \"name\", \"pricing\", \"quantity\", \"rate\", \"reservation_id\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING \"id\" [[\"amount\", #<BigDecimal:7fbc440cd480,'0.1E1',9(18)>], [\"code\", \"SHTLFE\"], [\"created_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00], [\"name\", \"Airport Shuttle Permit Fee 1.00 FLAT\"], [\"pricing\", \"flat\"], [\"quantity\", 1], [\"rate\", #<BigDecimal:7fbc440cd570,'0.1E1',9(18)>], [\"reservation_id\", 11000010], [\"updated_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00]]\n SQL (1.1ms) INSERT INTO \"reservation_fees\" (\"amount\", \"code\", \"created_at\", \"name\", \"pricing\", \"quantity\", \"rate\", \"reservation_id\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING \"id\" [[\"amount\", #<BigDecimal:7fbc440e3820,'0.41E1',18(18)>], [\"code\", \"STCHG\"], [\"created_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00], [\"name\", \"State Surcharge 2.05 PER DAY\"], [\"pricing\", \"per day\"], [\"quantity\", 2], [\"rate\", #<BigDecimal:7fbc440e38c0,'0.205E1',18(18)>], [\"reservation_id\", 11000010], [\"updated_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00]]\n SQL (1.1ms) INSERT INTO \"reservation_fees\" (\"amount\", \"code\", \"created_at\", \"name\", \"pricing\", \"quantity\", \"rate\", \"reservation_id\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING \"id\" [[\"amount\", #<BigDecimal:7fbc440ef558,'0.25E1',18(18)>], [\"code\", \"RCVR\"], [\"created_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00], [\"name\", \"License Recovery Fee 1.25 PER DAY\"], [\"pricing\", \"per day\"], [\"quantity\", 2], [\"rate\", #<BigDecimal:7fbc440ef620,'0.125E1',18(18)>], [\"reservation_id\", 11000010], [\"updated_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00]]\n SQL (1.0ms) INSERT INTO \"reservation_fees\" (\"amount\", \"code\", \"created_at\", \"name\", \"pricing\", \"quantity\", \"rate\", \"reservation_id\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING \"id\" [[\"amount\", #<BigDecimal:7fbc448c90a8,'0.328E1',18(18)>], [\"code\", \"APTFEE\"], [\"created_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00], [\"name\", \"Airport Access/Imposed Fee 9.29%\"], [\"pricing\", \"percent\"], [\"quantity\", 1], [\"rate\", #<BigDecimal:7fbc448c91c0,'0.929E1',18(18)>], [\"reservation_id\", 11000010], [\"updated_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00]]\n SQL (1.0ms) INSERT INTO \"reservation_fees\" (\"amount\", \"code\", \"created_at\", \"name\", \"pricing\", \"quantity\", \"rate\", \"reservation_id\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING \"id\" [[\"amount\", #<BigDecimal:7fbc448dd238,'0.299E1',18(18)>], [\"code\", \"STETAX\"], [\"created_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00], [\"name\", \"State Sales Tax 7.00%\"], [\"pricing\", \"percent\"], [\"quantity\", 1], [\"rate\", #<BigDecimal:7fbc448dd2d8,'0.7E1',9(18)>], [\"reservation_id\", 11000010], [\"updated_at\", Mon, 13 Aug 2012 17:36:33 EDT -04:00]]\n (1.9ms) COMMIT\n```\n3.2.7 & 3.2.8\n```\n SQL (3.1ms) INSERT INTO \"reservation_fees\" (\"amount\", \"code\", \"created_at\", \"name\", \"pricing\", \"quantity\", \"rate\", \"reservation_id\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING \"id\" [[\"amount\", #<BigDecimal:7f90d1a11ad0,'0.1E1',9(18)>], [\"code\", \"SHTLFE\"], [\"created_at\", Mon, 13 Aug 2012 17:26:10 EDT -04:00], [\"name\", \"Airport Shuttle Permit Fee 1.00 FLAT\"], [\"pricing\", \"flat\"], [\"quantity\", 1], [\"rate\", #<BigDecimal:7f90d1a14410,'0.1E1',9(18)>], [\"reservation_id\", 11000010], [\"updated_at\", Mon, 13 Aug 2012 17:26:10 EDT -04:00]]\nPG::Error: ERROR: duplicate key value violates unique constraint \"index_reservation_fees_on_reservation_id_and_code\"\nDETAIL: Key (reservation_id, code)=(11000010, SHTLFE) already exists.\n: INSERT INTO \"reservation_fees\" (\"amount\", \"code\", \"created_at\", \"name\", \"pricing\", \"quantity\", \"rate\", \"reservation_id\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING \"id\"\n (0.1ms) ROLLBACK\n```\n",
|
2405
|
+
"milestone": null,
|
2406
|
+
"labels": [
|
2407
|
+
{
|
2408
|
+
"name": "activerecord",
|
2409
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2410
|
+
"color": "0b02e1"
|
2411
|
+
}
|
2412
|
+
],
|
2413
|
+
"user": {
|
2414
|
+
"gravatar_id": "2a9d7f2c31d4a7a011b2d24cad9e3d4f",
|
2415
|
+
"avatar_url": "https://secure.gravatar.com/avatar/2a9d7f2c31d4a7a011b2d24cad9e3d4f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2416
|
+
"login": "luckyruby",
|
2417
|
+
"url": "https://api.github.com/users/luckyruby",
|
2418
|
+
"id": 1135026
|
2419
|
+
},
|
2420
|
+
"closed_at": null,
|
2421
|
+
"created_at": "2012-08-13T22:26:49Z",
|
2422
|
+
"comments": 3,
|
2423
|
+
"title": "mark_for_destruction order of execution not honored",
|
2424
|
+
"state": "open",
|
2425
|
+
"pull_request": {
|
2426
|
+
"patch_url": null,
|
2427
|
+
"html_url": null,
|
2428
|
+
"diff_url": null
|
2429
|
+
},
|
2430
|
+
"number": 7347,
|
2431
|
+
"html_url": "https://github.com/rails/rails/issues/7347",
|
2432
|
+
"updated_at": "2012-08-21T13:46:11Z",
|
2433
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7347",
|
2434
|
+
"assignee": null,
|
2435
|
+
"id": 6203919
|
2436
|
+
},
|
2437
|
+
{
|
2438
|
+
"body": "Due to https://github.com/rails/rails/blob/3-2-stable/activerecord/lib/active_record/railtie.rb#L80 active record will \"info\" log every time it connects to the database. This of course happens upon a rails boot. This makes it quite hard to execute a rails task with no output, since the script/task would normally boot rails then alter the log level, however due to the above line of code, there has already been \"info\" level output before we can alter it to \"warn\".\n\nThe only way I can see to do this is to create a whole separate environment for scripts to use that is still \"production\", except it has a different log level. This means a lot of duplication in configs etc, and is probably not the best idea for an environment that is not \"production\" to connect to the production database.\n\nI could just turn log_level to \"warn\" for the entire production environment, but I still want it in my web logs, just not for script output.",
|
2439
|
+
"milestone": null,
|
2440
|
+
"labels": [
|
2441
|
+
{
|
2442
|
+
"name": "activerecord",
|
2443
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2444
|
+
"color": "0b02e1"
|
2445
|
+
}
|
2446
|
+
],
|
2447
|
+
"user": {
|
2448
|
+
"gravatar_id": "4c4c3a1dea0b9b33f9c09cab404ba486",
|
2449
|
+
"avatar_url": "https://secure.gravatar.com/avatar/4c4c3a1dea0b9b33f9c09cab404ba486?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2450
|
+
"login": "tigris",
|
2451
|
+
"url": "https://api.github.com/users/tigris",
|
2452
|
+
"id": 26856
|
2453
|
+
},
|
2454
|
+
"closed_at": null,
|
2455
|
+
"created_at": "2012-08-13T11:24:35Z",
|
2456
|
+
"comments": 0,
|
2457
|
+
"title": "Allow booting rails under different log_level",
|
2458
|
+
"state": "open",
|
2459
|
+
"pull_request": {
|
2460
|
+
"patch_url": null,
|
2461
|
+
"html_url": null,
|
2462
|
+
"diff_url": null
|
2463
|
+
},
|
2464
|
+
"number": 7346,
|
2465
|
+
"html_url": "https://github.com/rails/rails/issues/7346",
|
2466
|
+
"updated_at": "2012-08-13T11:24:35Z",
|
2467
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7346",
|
2468
|
+
"assignee": null,
|
2469
|
+
"id": 6187942
|
2470
|
+
},
|
2471
|
+
{
|
2472
|
+
"body": "@tenderlove will add rest range to this pull request later. But for now you can check and tell if i missed something :) or may be if some improvements can be done.",
|
2473
|
+
"milestone": null,
|
2474
|
+
"labels": [
|
2475
|
+
{
|
2476
|
+
"name": "activerecord",
|
2477
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2478
|
+
"color": "0b02e1"
|
2479
|
+
}
|
2480
|
+
],
|
2481
|
+
"user": {
|
2482
|
+
"gravatar_id": "ce5d1a4d26241d16575889a6f1ed4487",
|
2483
|
+
"avatar_url": "https://secure.gravatar.com/avatar/ce5d1a4d26241d16575889a6f1ed4487?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2484
|
+
"login": "slbug",
|
2485
|
+
"url": "https://api.github.com/users/slbug",
|
2486
|
+
"id": 108694
|
2487
|
+
},
|
2488
|
+
"closed_at": null,
|
2489
|
+
"created_at": "2012-08-13T10:57:13Z",
|
2490
|
+
"comments": 3,
|
2491
|
+
"title": "Postgresql range support",
|
2492
|
+
"state": "open",
|
2493
|
+
"pull_request": {
|
2494
|
+
"patch_url": "https://github.com/rails/rails/pull/7345.patch",
|
2495
|
+
"html_url": "https://github.com/rails/rails/pull/7345",
|
2496
|
+
"diff_url": "https://github.com/rails/rails/pull/7345.diff"
|
2497
|
+
},
|
2498
|
+
"number": 7345,
|
2499
|
+
"html_url": "https://github.com/rails/rails/issues/7345",
|
2500
|
+
"updated_at": "2012-08-16T11:56:47Z",
|
2501
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7345",
|
2502
|
+
"assignee": null,
|
2503
|
+
"id": 6187481
|
2504
|
+
},
|
2505
|
+
{
|
2506
|
+
"body": "Tested rails master branch with Oracle enhanced adapter rails4, two inverse associations test got failed as follows.\n\n```ruby\n$ ARCONN=oracle ruby -Itest test/cases/associations/inverse_associations_test.rb \nUsing oracle\nRun options: --seed 25611\n\n# Running tests:\n\n.......................FF............\n\nFinished tests in 1.242921s, 29.7686 tests/s, 117.4652 assertions/s.\n\n 1) Failure:\ntest_parent_instance_should_be_shared_with_newly_created_child(InverseHasOneTests) [test/cases/associations/inverse_associations_test.rb:133]:\nName of man should be the same after changes to parent instance.\nExpected: \"Bongo\"\n Actual: \"Steve\"\n\n 2) Failure:\ntest_parent_instance_should_be_shared_with_newly_created_child_via_bang_method(InverseHasOneTests) [test/cases/associations/inverse_associations_test.rb:144]:\nName of man should be the same after changes to parent instance.\nExpected: \"Bongo\"\n Actual: \"Steve\"\n\n37 tests, 146 assertions, 2 failures, 0 errors, 0 skips\n$ \n```\n\nAccording to the `git bisect` output, 42dd5d9f2976677a4bf22347f2dde1a8135dfbb4 made in #7191 is the first commit which cause these failures.\n",
|
2507
|
+
"milestone": {
|
2508
|
+
"due_on": null,
|
2509
|
+
"description": "Changes that break 3.x API.",
|
2510
|
+
"created_at": "2011-10-09T02:53:46Z",
|
2511
|
+
"title": "4.0.0",
|
2512
|
+
"state": "open",
|
2513
|
+
"closed_issues": 10,
|
2514
|
+
"number": 9,
|
2515
|
+
"open_issues": 3,
|
2516
|
+
"url": "https://api.github.com/repos/rails/rails/milestones/9",
|
2517
|
+
"id": 44893,
|
2518
|
+
"creator": {
|
2519
|
+
"gravatar_id": "24d2f8804e6bb4b7ea6bd11e0a586470",
|
2520
|
+
"avatar_url": "https://secure.gravatar.com/avatar/24d2f8804e6bb4b7ea6bd11e0a586470?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2521
|
+
"login": "jeremy",
|
2522
|
+
"url": "https://api.github.com/users/jeremy",
|
2523
|
+
"id": 199
|
2524
|
+
}
|
2525
|
+
},
|
2526
|
+
"labels": [
|
2527
|
+
{
|
2528
|
+
"name": "activerecord",
|
2529
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2530
|
+
"color": "0b02e1"
|
2531
|
+
}
|
2532
|
+
],
|
2533
|
+
"user": {
|
2534
|
+
"gravatar_id": "e2cb998e15d8e8fdef4f11a1f510fe74",
|
2535
|
+
"avatar_url": "https://secure.gravatar.com/avatar/e2cb998e15d8e8fdef4f11a1f510fe74?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2536
|
+
"login": "yahonda",
|
2537
|
+
"url": "https://api.github.com/users/yahonda",
|
2538
|
+
"id": 73684
|
2539
|
+
},
|
2540
|
+
"closed_at": null,
|
2541
|
+
"created_at": "2012-08-12T00:22:03Z",
|
2542
|
+
"comments": 16,
|
2543
|
+
"title": "two inverse associations test got failed with Oracle enhanced adapter",
|
2544
|
+
"state": "open",
|
2545
|
+
"pull_request": {
|
2546
|
+
"patch_url": null,
|
2547
|
+
"html_url": null,
|
2548
|
+
"diff_url": null
|
2549
|
+
},
|
2550
|
+
"number": 7334,
|
2551
|
+
"html_url": "https://github.com/rails/rails/issues/7334",
|
2552
|
+
"updated_at": "2012-08-23T01:50:36Z",
|
2553
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7334",
|
2554
|
+
"assignee": null,
|
2555
|
+
"id": 6173924
|
2556
|
+
},
|
2557
|
+
{
|
2558
|
+
"body": "Given Post class:\n```\nclass Post < ActiveRecord::Base\n has_many :comments\n\n after_find do\n # Any associations usage. For example:\n self.comments.to_a\n end\nend\n```\nCalling ```Post.includes(:comments).to_a``` will execute more then two queries (if more then one Post exist). Comments for posts will be loaded separately.\nThe reason is that ```after_initialize``` and ```after_find``` called before ([exec_queries](https://github.com/rails/rails/blob/1d46163c6d392752e2c1ac56893317d0a7d01242/activerecord/lib/active_record/relation.rb#L556), [find_by_sql](https://github.com/rails/rails/blob/1d46163c6d392752e2c1ac56893317d0a7d01242/activerecord/lib/active_record/querying.rb#L46), [instantiate](https://github.com/rails/rails/blob/1d46163c6d392752e2c1ac56893317d0a7d01242/activerecord/lib/active_record/inheritance.rb#L96) and at the end [init_with](https://github.com/rails/rails/blob/1d46163c6d392752e2c1ac56893317d0a7d01242/activerecord/lib/active_record/core.rb#L209-210)) loading associations ([lines 558 - 562](https://github.com/rails/rails/blob/1d46163c6d392752e2c1ac56893317d0a7d01242/activerecord/lib/active_record/relation.rb#L558-562)).",
|
2559
|
+
"milestone": null,
|
2560
|
+
"labels": [
|
2561
|
+
{
|
2562
|
+
"name": "activerecord",
|
2563
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2564
|
+
"color": "0b02e1"
|
2565
|
+
}
|
2566
|
+
],
|
2567
|
+
"user": {
|
2568
|
+
"gravatar_id": "e4faab5b78bd2754387013bf8ebab06e",
|
2569
|
+
"avatar_url": "https://secure.gravatar.com/avatar/e4faab5b78bd2754387013bf8ebab06e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2570
|
+
"login": "roshats",
|
2571
|
+
"url": "https://api.github.com/users/roshats",
|
2572
|
+
"id": 434466
|
2573
|
+
},
|
2574
|
+
"closed_at": null,
|
2575
|
+
"created_at": "2012-08-11T18:22:49Z",
|
2576
|
+
"comments": 0,
|
2577
|
+
"title": "Using association in after_initialize and after_find breaks includes and joins",
|
2578
|
+
"state": "open",
|
2579
|
+
"pull_request": {
|
2580
|
+
"patch_url": null,
|
2581
|
+
"html_url": null,
|
2582
|
+
"diff_url": null
|
2583
|
+
},
|
2584
|
+
"number": 7332,
|
2585
|
+
"html_url": "https://github.com/rails/rails/issues/7332",
|
2586
|
+
"updated_at": "2012-08-11T18:22:49Z",
|
2587
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7332",
|
2588
|
+
"assignee": null,
|
2589
|
+
"id": 6171910
|
2590
|
+
},
|
2591
|
+
{
|
2592
|
+
"body": "@tenderlove https://twitter.com/tenderlove/statuses/231807764907819008\n\nToday I looked into adding support for the postgresql geo types. Everything went well but I didn't manage to get AR to type cast pg's string representation into an array. (See the failing `base_test.rb`)\n\nGot a pointer for me?",
|
2593
|
+
"milestone": null,
|
2594
|
+
"labels": [
|
2595
|
+
{
|
2596
|
+
"name": "activerecord",
|
2597
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2598
|
+
"color": "0b02e1"
|
2599
|
+
}
|
2600
|
+
],
|
2601
|
+
"user": {
|
2602
|
+
"gravatar_id": "64afebe5db598b0b043f35560bf940df",
|
2603
|
+
"avatar_url": "https://secure.gravatar.com/avatar/64afebe5db598b0b043f35560bf940df?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2604
|
+
"login": "MSch",
|
2605
|
+
"url": "https://api.github.com/users/MSch",
|
2606
|
+
"id": 7475
|
2607
|
+
},
|
2608
|
+
"closed_at": null,
|
2609
|
+
"created_at": "2012-08-10T16:01:46Z",
|
2610
|
+
"comments": 0,
|
2611
|
+
"title": "Add support for pg geometric datatypes point and box",
|
2612
|
+
"state": "open",
|
2613
|
+
"pull_request": {
|
2614
|
+
"patch_url": "https://github.com/rails/rails/pull/7324.patch",
|
2615
|
+
"html_url": "https://github.com/rails/rails/pull/7324",
|
2616
|
+
"diff_url": "https://github.com/rails/rails/pull/7324.diff"
|
2617
|
+
},
|
2618
|
+
"number": 7324,
|
2619
|
+
"html_url": "https://github.com/rails/rails/issues/7324",
|
2620
|
+
"updated_at": "2012-08-10T21:20:53Z",
|
2621
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7324",
|
2622
|
+
"assignee": {
|
2623
|
+
"gravatar_id": "f29327647a9cff5c69618bae420792ea",
|
2624
|
+
"avatar_url": "https://secure.gravatar.com/avatar/f29327647a9cff5c69618bae420792ea?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2625
|
+
"login": "tenderlove",
|
2626
|
+
"url": "https://api.github.com/users/tenderlove",
|
2627
|
+
"id": 3124
|
2628
|
+
},
|
2629
|
+
"id": 6156000
|
2630
|
+
},
|
2631
|
+
{
|
2632
|
+
"body": "If I send an email with Rails 3.2.7 this sample text will come out okay:\n\nThis isn't the only thing that doesn't work.\n\nHowever after upgrading to 3.2.8, the email comes out like this:\n\nThis isn't the only thing that doesn't work.\n\n",
|
2633
|
+
"milestone": {
|
2634
|
+
"due_on": null,
|
2635
|
+
"description": null,
|
2636
|
+
"created_at": "2012-08-12T00:25:49Z",
|
2637
|
+
"title": "3.2.9",
|
2638
|
+
"state": "open",
|
2639
|
+
"closed_issues": 2,
|
2640
|
+
"number": 20,
|
2641
|
+
"open_issues": 1,
|
2642
|
+
"url": "https://api.github.com/repos/rails/rails/milestones/20",
|
2643
|
+
"id": 159647,
|
2644
|
+
"creator": {
|
2645
|
+
"gravatar_id": "0525b332aafb83307b32d9747a93de03",
|
2646
|
+
"avatar_url": "https://secure.gravatar.com/avatar/0525b332aafb83307b32d9747a93de03?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2647
|
+
"login": "rafaelfranca",
|
2648
|
+
"url": "https://api.github.com/users/rafaelfranca",
|
2649
|
+
"id": 47848
|
2650
|
+
}
|
2651
|
+
},
|
2652
|
+
"labels": [
|
2653
|
+
{
|
2654
|
+
"name": "regression",
|
2655
|
+
"url": "https://api.github.com/repos/rails/rails/labels/regression",
|
2656
|
+
"color": "e10c02"
|
2657
|
+
},
|
2658
|
+
{
|
2659
|
+
"name": "actionmailer",
|
2660
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionmailer",
|
2661
|
+
"color": "8B00FC"
|
2662
|
+
},
|
2663
|
+
{
|
2664
|
+
"name": "3-2-stable",
|
2665
|
+
"url": "https://api.github.com/repos/rails/rails/labels/3-2-stable",
|
2666
|
+
"color": "02d7e1"
|
2667
|
+
}
|
2668
|
+
],
|
2669
|
+
"user": {
|
2670
|
+
"gravatar_id": "7dcd274c0876e1a8f57da36cdf3291a3",
|
2671
|
+
"avatar_url": "https://secure.gravatar.com/avatar/7dcd274c0876e1a8f57da36cdf3291a3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2672
|
+
"login": "allesklar",
|
2673
|
+
"url": "https://api.github.com/users/allesklar",
|
2674
|
+
"id": 4579
|
2675
|
+
},
|
2676
|
+
"closed_at": null,
|
2677
|
+
"created_at": "2012-08-10T08:26:21Z",
|
2678
|
+
"comments": 5,
|
2679
|
+
"title": "Email text encoding issue upon upgrading to 3.2.8",
|
2680
|
+
"state": "open",
|
2681
|
+
"pull_request": {
|
2682
|
+
"patch_url": null,
|
2683
|
+
"html_url": null,
|
2684
|
+
"diff_url": null
|
2685
|
+
},
|
2686
|
+
"number": 7318,
|
2687
|
+
"html_url": "https://github.com/rails/rails/issues/7318",
|
2688
|
+
"updated_at": "2012-08-13T10:58:32Z",
|
2689
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7318",
|
2690
|
+
"assignee": null,
|
2691
|
+
"id": 6145878
|
2692
|
+
},
|
2693
|
+
{
|
2694
|
+
"body": "When you include more tags in the logging, for example:\n\n```ruby\nconfig.log_tags = [:uuid, :remote_ip]\n```\n\nThen the first log line for request looks like this:\n\n```\n[c6cbd2272812fe3417bb48f7a9bab919] [127.0.0.1] \n\nStarted POST \"/products\" for 127.0.0.1 at 2012-07-25 08:49:35 +0200\n[c6cbd2272812fe3417bb48f7a9bab919] [127.0.0.1] Processing by ProductsController#create as JSON\n```\n\nSo when you want to grep through the logs, the line \"Started ...\" does not lineup with the \"metadata\" like request uuid and ip address, because it has \\n\\n newlines in the beginning and grep does not like that.\n\nMy fix removes the two newlines.\n\nThis has also been discussed in issue https://github.com/rails/rails/issues/3697",
|
2695
|
+
"milestone": null,
|
2696
|
+
"labels": [
|
2697
|
+
{
|
2698
|
+
"name": "actionpack",
|
2699
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
2700
|
+
"color": "FFF700"
|
2701
|
+
}
|
2702
|
+
],
|
2703
|
+
"user": {
|
2704
|
+
"gravatar_id": "4fdbb8aa3568e47391a8fd6c6760de11",
|
2705
|
+
"avatar_url": "https://secure.gravatar.com/avatar/4fdbb8aa3568e47391a8fd6c6760de11?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2706
|
+
"login": "alhafoudh",
|
2707
|
+
"url": "https://api.github.com/users/alhafoudh",
|
2708
|
+
"id": 43397
|
2709
|
+
},
|
2710
|
+
"closed_at": null,
|
2711
|
+
"created_at": "2012-08-10T06:10:13Z",
|
2712
|
+
"comments": 3,
|
2713
|
+
"title": "Fix newlines in rack logging",
|
2714
|
+
"state": "open",
|
2715
|
+
"pull_request": {
|
2716
|
+
"patch_url": "https://github.com/rails/rails/pull/7317.patch",
|
2717
|
+
"html_url": "https://github.com/rails/rails/pull/7317",
|
2718
|
+
"diff_url": "https://github.com/rails/rails/pull/7317.diff"
|
2719
|
+
},
|
2720
|
+
"number": 7317,
|
2721
|
+
"html_url": "https://github.com/rails/rails/issues/7317",
|
2722
|
+
"updated_at": "2012-08-26T03:58:27Z",
|
2723
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7317",
|
2724
|
+
"assignee": null,
|
2725
|
+
"id": 6144163
|
2726
|
+
},
|
2727
|
+
{
|
2728
|
+
"body": "When database.yml specifies a mysql database for use, and no mysql adapter gem is installed, rake db:create tells the user to install activerecord-mysql2-adapter. activerecord-mysql2-adapter however is currently problematic with rails. mysql2 gem should be recommended instead. ",
|
2729
|
+
"milestone": null,
|
2730
|
+
"labels": [
|
2731
|
+
|
2732
|
+
],
|
2733
|
+
"user": {
|
2734
|
+
"gravatar_id": "666876db59b0df248e03cd83412f4c26",
|
2735
|
+
"avatar_url": "https://secure.gravatar.com/avatar/666876db59b0df248e03cd83412f4c26?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2736
|
+
"login": "NorrinRadd",
|
2737
|
+
"url": "https://api.github.com/users/NorrinRadd",
|
2738
|
+
"id": 971294
|
2739
|
+
},
|
2740
|
+
"closed_at": null,
|
2741
|
+
"created_at": "2012-08-10T04:12:05Z",
|
2742
|
+
"comments": 7,
|
2743
|
+
"title": "rails gem recommends installing incompatible mysql adapter",
|
2744
|
+
"state": "open",
|
2745
|
+
"pull_request": {
|
2746
|
+
"patch_url": null,
|
2747
|
+
"html_url": null,
|
2748
|
+
"diff_url": null
|
2749
|
+
},
|
2750
|
+
"number": 7313,
|
2751
|
+
"html_url": "https://github.com/rails/rails/issues/7313",
|
2752
|
+
"updated_at": "2012-08-12T15:25:32Z",
|
2753
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7313",
|
2754
|
+
"assignee": null,
|
2755
|
+
"id": 6143263
|
2756
|
+
},
|
2757
|
+
{
|
2758
|
+
"body": "Fixing a problem detailed in #7311. Not ready to pull until that discussion is resolved.",
|
2759
|
+
"milestone": null,
|
2760
|
+
"labels": [
|
2761
|
+
|
2762
|
+
],
|
2763
|
+
"user": {
|
2764
|
+
"gravatar_id": "e1e3a7a63326260b58f82d12f9003e64",
|
2765
|
+
"avatar_url": "https://secure.gravatar.com/avatar/e1e3a7a63326260b58f82d12f9003e64?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2766
|
+
"login": "krainboltgreene",
|
2767
|
+
"url": "https://api.github.com/users/krainboltgreene",
|
2768
|
+
"id": 334809
|
2769
|
+
},
|
2770
|
+
"closed_at": null,
|
2771
|
+
"created_at": "2012-08-10T04:11:44Z",
|
2772
|
+
"comments": 3,
|
2773
|
+
"title": "Http token parser bug",
|
2774
|
+
"state": "open",
|
2775
|
+
"pull_request": {
|
2776
|
+
"patch_url": "https://github.com/rails/rails/pull/7312.patch",
|
2777
|
+
"html_url": "https://github.com/rails/rails/pull/7312",
|
2778
|
+
"diff_url": "https://github.com/rails/rails/pull/7312.diff"
|
2779
|
+
},
|
2780
|
+
"number": 7312,
|
2781
|
+
"html_url": "https://github.com/rails/rails/issues/7312",
|
2782
|
+
"updated_at": "2012-08-14T23:13:27Z",
|
2783
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7312",
|
2784
|
+
"assignee": null,
|
2785
|
+
"id": 6143260
|
2786
|
+
},
|
2787
|
+
{
|
2788
|
+
"body": "So I've been building an API and ran into a rather unique problem: When using a token value for http authentication w/token that has a `=` character I would lose the data after and any `=` characters. This caused a significant confusion and problem.",
|
2789
|
+
"milestone": null,
|
2790
|
+
"labels": [
|
2791
|
+
|
2792
|
+
],
|
2793
|
+
"user": {
|
2794
|
+
"gravatar_id": "e1e3a7a63326260b58f82d12f9003e64",
|
2795
|
+
"avatar_url": "https://secure.gravatar.com/avatar/e1e3a7a63326260b58f82d12f9003e64?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2796
|
+
"login": "krainboltgreene",
|
2797
|
+
"url": "https://api.github.com/users/krainboltgreene",
|
2798
|
+
"id": 334809
|
2799
|
+
},
|
2800
|
+
"closed_at": null,
|
2801
|
+
"created_at": "2012-08-10T01:29:39Z",
|
2802
|
+
"comments": 8,
|
2803
|
+
"title": "Authentication With Token Problem",
|
2804
|
+
"state": "open",
|
2805
|
+
"pull_request": {
|
2806
|
+
"patch_url": null,
|
2807
|
+
"html_url": null,
|
2808
|
+
"diff_url": null
|
2809
|
+
},
|
2810
|
+
"number": 7311,
|
2811
|
+
"html_url": "https://github.com/rails/rails/issues/7311",
|
2812
|
+
"updated_at": "2012-08-20T12:56:09Z",
|
2813
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7311",
|
2814
|
+
"assignee": null,
|
2815
|
+
"id": 6141700
|
2816
|
+
},
|
2817
|
+
{
|
2818
|
+
"body": "Hi,\n\nI created a column named `sometime` as `time` on my database.\n\nSetting the value using a string, active record do not apply the timezone, take a look:\n\n``` ruby\nuser = User.find(1)\n\nuser.sometime = '10:00'\n#=> \"10:00\"\n\nuser.sometime\n#=> 2000-01-01 10:00:00 UTC\n```\n\nBut active record do that for date time columns, take a look:\n\n``` ruby\nuser.created_at = '2000-01-01 10:00'\n#=> \"2000-01-01 10:00\"\n\nuser.created_at\n#=> Sat, 01 Jan 2000 10:00:00 BRST -02:00\n```\n\nAnother problem, the time zone is applied when I use the time object but does not de-convert on reloading object from database:\n\n``` ruby\nuser.sometime = Time.current\n#=> Thu, 09 Aug 2012 10:19:09 BRT -03:00\n\nuser.save\n#=> UPDATE \"users\" SET \"sometime\" = '2012-08-09 13:19:09.977383' ...\n\nuser.reload\n\nuser.sometime\n#=> 2000-01-01 13:19:09 UTC\n```\n\nBut, date time columns do that:\n\n``` ruby\nuser.created_at = Time.current\n#=> Thu, 09 Aug 2012 10:20:52 BRT -03:00\n\nuser.save\n#=> UPDATE \"users\" SET \"created_at\" = '2012-08-09 13:20:52.383136' ...\n\nuser.reload\n\nuser.created_at\n#=> Thu, 09 Aug 2012 10:20:52 BRT -03:00\n```\n\nMaybe I'm missing something but since it just works for date time columns, I'm guessing that's a bug.\n\nNote: I'm using active record 3.2.7 with postgresql adapter.",
|
2819
|
+
"milestone": null,
|
2820
|
+
"labels": [
|
2821
|
+
{
|
2822
|
+
"name": "activerecord",
|
2823
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2824
|
+
"color": "0b02e1"
|
2825
|
+
}
|
2826
|
+
],
|
2827
|
+
"user": {
|
2828
|
+
"gravatar_id": "c2dc9c02ce7a041285725a4fc9e5f6d2",
|
2829
|
+
"avatar_url": "https://secure.gravatar.com/avatar/c2dc9c02ce7a041285725a4fc9e5f6d2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2830
|
+
"login": "sobrinho",
|
2831
|
+
"url": "https://api.github.com/users/sobrinho",
|
2832
|
+
"id": 26460
|
2833
|
+
},
|
2834
|
+
"closed_at": null,
|
2835
|
+
"created_at": "2012-08-09T13:27:35Z",
|
2836
|
+
"comments": 2,
|
2837
|
+
"title": "ActiveRecord does not apply timezone in time columns",
|
2838
|
+
"state": "open",
|
2839
|
+
"pull_request": {
|
2840
|
+
"patch_url": null,
|
2841
|
+
"html_url": null,
|
2842
|
+
"diff_url": null
|
2843
|
+
},
|
2844
|
+
"number": 7301,
|
2845
|
+
"html_url": "https://github.com/rails/rails/issues/7301",
|
2846
|
+
"updated_at": "2012-08-12T04:09:31Z",
|
2847
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7301",
|
2848
|
+
"assignee": null,
|
2849
|
+
"id": 6126690
|
2850
|
+
},
|
2851
|
+
{
|
2852
|
+
"body": "Having an issue with a `ActiveSupport::TimeZone` instance returning an incorrect offset during Daylight Savings Time and I'm not sure if this is the intended behavior.\n\n```ruby\npdt = ActiveSupport::TimeZone.new(\"Pacific Time (US & Canada)\")\n\n# the time is correct\npdt.now # => Wed, 08 Aug 2012 23:46:57 PDT -07:00\n\n# although the offset is wrong\npdt.formatted_offset # => \"-08:00\"\npdt.utc_offset # => 28800 (28800/3600 = 8)\n```\n\nIt looks like internally it's aware of DST but the offset methods are painting a different picture. **This is with Rails 3.2.7.**",
|
2853
|
+
"milestone": null,
|
2854
|
+
"labels": [
|
2855
|
+
{
|
2856
|
+
"name": "activesupport",
|
2857
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
2858
|
+
"color": "FC9300"
|
2859
|
+
}
|
2860
|
+
],
|
2861
|
+
"user": {
|
2862
|
+
"gravatar_id": "fb01c0ef13af3e410b207f2aa2375693",
|
2863
|
+
"avatar_url": "https://secure.gravatar.com/avatar/fb01c0ef13af3e410b207f2aa2375693?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2864
|
+
"login": "Axsuul",
|
2865
|
+
"url": "https://api.github.com/users/Axsuul",
|
2866
|
+
"id": 187961
|
2867
|
+
},
|
2868
|
+
"closed_at": null,
|
2869
|
+
"created_at": "2012-08-09T07:09:13Z",
|
2870
|
+
"comments": 1,
|
2871
|
+
"title": "ActiveSupport::TimeZone gives incorrect offset during Daylight Savings Time",
|
2872
|
+
"state": "open",
|
2873
|
+
"pull_request": {
|
2874
|
+
"patch_url": null,
|
2875
|
+
"html_url": null,
|
2876
|
+
"diff_url": null
|
2877
|
+
},
|
2878
|
+
"number": 7297,
|
2879
|
+
"html_url": "https://github.com/rails/rails/issues/7297",
|
2880
|
+
"updated_at": "2012-08-12T21:15:09Z",
|
2881
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7297",
|
2882
|
+
"assignee": null,
|
2883
|
+
"id": 6120796
|
2884
|
+
},
|
2885
|
+
{
|
2886
|
+
"body": "ActiveRecord::Timestamp#initialize_dup does not call super. This results in initialize_copy not being called because the call does not bubble up to Object.\n\nThis means that a user who wants special behavior when duping and ActiveRecord::Base object has to override initialize_dup and make sure to call super before doing anything.\n\nIf ActiveRecord::Timestamp called super then the common initialize_copy would be called.\n\nHaving gone through this and seeing what happens when you clone an ActiveRecord::Base object I'm not sure if this is a bug or a feature.\n\nIf it's a bug - the fix is trivial - but I think it deserves some discussion [I did some testing which is documented here: http://wp.me/p2Ddsm-11 ]",
|
2887
|
+
"milestone": null,
|
2888
|
+
"labels": [
|
2889
|
+
{
|
2890
|
+
"name": "activerecord",
|
2891
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
2892
|
+
"color": "0b02e1"
|
2893
|
+
}
|
2894
|
+
],
|
2895
|
+
"user": {
|
2896
|
+
"gravatar_id": "21b9bc8f270c2c19e3738f988c93f3c4",
|
2897
|
+
"avatar_url": "https://secure.gravatar.com/avatar/21b9bc8f270c2c19e3738f988c93f3c4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2898
|
+
"login": "mikehoward",
|
2899
|
+
"url": "https://api.github.com/users/mikehoward",
|
2900
|
+
"id": 639851
|
2901
|
+
},
|
2902
|
+
"closed_at": null,
|
2903
|
+
"created_at": "2012-08-08T19:31:45Z",
|
2904
|
+
"comments": 2,
|
2905
|
+
"title": "ActiveRecord::Timestamp#initialize_dup does not call super",
|
2906
|
+
"state": "open",
|
2907
|
+
"pull_request": {
|
2908
|
+
"patch_url": null,
|
2909
|
+
"html_url": null,
|
2910
|
+
"diff_url": null
|
2911
|
+
},
|
2912
|
+
"number": 7291,
|
2913
|
+
"html_url": "https://github.com/rails/rails/issues/7291",
|
2914
|
+
"updated_at": "2012-08-08T23:38:51Z",
|
2915
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7291",
|
2916
|
+
"assignee": null,
|
2917
|
+
"id": 6111343
|
2918
|
+
},
|
2919
|
+
{
|
2920
|
+
"body": "In most cases, when you benchmarking something you are interested not only in average metric value, but in total metric value.\n\nThis change adds total value, along with average. \n\nBy the way: atm, nothing in rails docs saying that you will get average metric value instead of total.\n\nAlso, it will be nice to have this change in stable branch too.",
|
2921
|
+
"milestone": null,
|
2922
|
+
"labels": [
|
2923
|
+
{
|
2924
|
+
"name": "activesupport",
|
2925
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
2926
|
+
"color": "FC9300"
|
2927
|
+
}
|
2928
|
+
],
|
2929
|
+
"user": {
|
2930
|
+
"gravatar_id": "325aaa07b35482f40220e5ec893b767c",
|
2931
|
+
"avatar_url": "https://secure.gravatar.com/avatar/325aaa07b35482f40220e5ec893b767c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2932
|
+
"login": "y8",
|
2933
|
+
"url": "https://api.github.com/users/y8",
|
2934
|
+
"id": 80930
|
2935
|
+
},
|
2936
|
+
"closed_at": null,
|
2937
|
+
"created_at": "2012-08-08T18:34:18Z",
|
2938
|
+
"comments": 3,
|
2939
|
+
"title": "Performance testing: add total value of metric",
|
2940
|
+
"state": "open",
|
2941
|
+
"pull_request": {
|
2942
|
+
"patch_url": "https://github.com/rails/rails/pull/7290.patch",
|
2943
|
+
"html_url": "https://github.com/rails/rails/pull/7290",
|
2944
|
+
"diff_url": "https://github.com/rails/rails/pull/7290.diff"
|
2945
|
+
},
|
2946
|
+
"number": 7290,
|
2947
|
+
"html_url": "https://github.com/rails/rails/issues/7290",
|
2948
|
+
"updated_at": "2012-08-22T21:19:18Z",
|
2949
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7290",
|
2950
|
+
"assignee": null,
|
2951
|
+
"id": 6109949
|
2952
|
+
},
|
2953
|
+
{
|
2954
|
+
"body": "While upgrading a Rails 3.0 app to 3.2, I had the following deprecation warning appear in my console during test runs:\n`DEPRECATION WARNING: Passing the format in the template name is deprecated. Please pass render with :formats => [:html] instead. (called from realtime at /Users/edward/.rbenv/versions/1.9.3-p125-perf/lib/ruby/1.9.1/benchmark.rb:295`\n\nUnfortunately, this doesn’t help me find where in my app the deprecated code is so that I can fix it.\n\nIs there a way to provide the file and line number in the deprecation notification?",
|
2955
|
+
"milestone": null,
|
2956
|
+
"labels": [
|
2957
|
+
|
2958
|
+
],
|
2959
|
+
"user": {
|
2960
|
+
"gravatar_id": "83a4ac21377f0939f0ccc3b6db7a9bd1",
|
2961
|
+
"avatar_url": "https://secure.gravatar.com/avatar/83a4ac21377f0939f0ccc3b6db7a9bd1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2962
|
+
"login": "edward",
|
2963
|
+
"url": "https://api.github.com/users/edward",
|
2964
|
+
"id": 325
|
2965
|
+
},
|
2966
|
+
"closed_at": null,
|
2967
|
+
"created_at": "2012-08-08T15:39:25Z",
|
2968
|
+
"comments": 8,
|
2969
|
+
"title": "Deprecation warning provides no context",
|
2970
|
+
"state": "open",
|
2971
|
+
"pull_request": {
|
2972
|
+
"patch_url": null,
|
2973
|
+
"html_url": null,
|
2974
|
+
"diff_url": null
|
2975
|
+
},
|
2976
|
+
"number": 7288,
|
2977
|
+
"html_url": "https://github.com/rails/rails/issues/7288",
|
2978
|
+
"updated_at": "2012-08-12T20:47:57Z",
|
2979
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7288",
|
2980
|
+
"assignee": null,
|
2981
|
+
"id": 6105803
|
2982
|
+
},
|
2983
|
+
{
|
2984
|
+
"body": "When nil or empty string are not allowed, they are not valid.",
|
2985
|
+
"milestone": null,
|
2986
|
+
"labels": [
|
2987
|
+
{
|
2988
|
+
"name": "activemodel",
|
2989
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activemodel",
|
2990
|
+
"color": "00E5FF"
|
2991
|
+
}
|
2992
|
+
],
|
2993
|
+
"user": {
|
2994
|
+
"gravatar_id": "891bcc82e560d7918fe68611dc72f3dd",
|
2995
|
+
"avatar_url": "https://secure.gravatar.com/avatar/891bcc82e560d7918fe68611dc72f3dd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
2996
|
+
"login": "xHire",
|
2997
|
+
"url": "https://api.github.com/users/xHire",
|
2998
|
+
"id": 24714
|
2999
|
+
},
|
3000
|
+
"closed_at": null,
|
3001
|
+
"created_at": "2012-08-07T11:55:35Z",
|
3002
|
+
"comments": 0,
|
3003
|
+
"title": "Length validation handles correctly nil. Fix #7180",
|
3004
|
+
"state": "open",
|
3005
|
+
"pull_request": {
|
3006
|
+
"patch_url": "https://github.com/rails/rails/pull/7282.patch",
|
3007
|
+
"html_url": "https://github.com/rails/rails/pull/7282",
|
3008
|
+
"diff_url": "https://github.com/rails/rails/pull/7282.diff"
|
3009
|
+
},
|
3010
|
+
"number": 7282,
|
3011
|
+
"html_url": "https://github.com/rails/rails/issues/7282",
|
3012
|
+
"updated_at": "2012-08-07T11:55:35Z",
|
3013
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7282",
|
3014
|
+
"assignee": null,
|
3015
|
+
"id": 6074272
|
3016
|
+
},
|
3017
|
+
{
|
3018
|
+
"body": "Reversible migrations are very cool.\n\nSome commands are not reversible, for example the removal of a table or a column.\n\nAlso, one downside is that it is now more difficult to write the reverse of a migration if `change` is used. When `up` and `down` were used, one could simply swap the code around.\n\nThese commits introduce `Migration#revert` that makes it trivial to revert a past migration, in part or in whole, or do a reversible removal of a table/column.\n\nNote that `revert` can even be called from legacy migrations using `up` & `down` and that it can revert legacy-style migrations too. For anyone changing their mind every second day, `revert` is fully nestable.\n\nTo have complete revertible capability, I would like to introduce a modified syntax for `change_column` that would allow it to be revertible; pull request upcoming when I get a chance...\n\nHere's what the rdoc looks like:\n\n---\n\nReverses the migration commands for the given block and the given migrations.\n\nThe following migration will remove the table 'horses' and create the table 'apples' on the way up, and the reverse on the way down.\n\n class FixTLMigration < ActiveRecord::Migration\n def change\n revert do\n create_table(:horses) do |t|\n t.text :content\n t.datetime :remind_at\n end\n end\n create_table(:apples) do |t|\n t.string :variety\n end\n end\n end\n\nOr equivalently, if `TenderloveMigration` is defined as in the\ndocumentation for Migration:\n\n class FixupTLMigration < ActiveRecord::Migration\n def change\n revert TenderloveMigration\n\n create_table(:apples) do |t|\n t.string :variety\n end\n end\n end\n\nThis command can be nested.\n",
|
3019
|
+
"milestone": null,
|
3020
|
+
"labels": [
|
3021
|
+
{
|
3022
|
+
"name": "activerecord",
|
3023
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3024
|
+
"color": "0b02e1"
|
3025
|
+
}
|
3026
|
+
],
|
3027
|
+
"user": {
|
3028
|
+
"gravatar_id": "b06d8e26b92456b228d3c77b66397534",
|
3029
|
+
"avatar_url": "https://secure.gravatar.com/avatar/b06d8e26b92456b228d3c77b66397534?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3030
|
+
"login": "marcandre",
|
3031
|
+
"url": "https://api.github.com/users/marcandre",
|
3032
|
+
"id": 33770
|
3033
|
+
},
|
3034
|
+
"closed_at": null,
|
3035
|
+
"created_at": "2012-08-07T05:14:21Z",
|
3036
|
+
"comments": 11,
|
3037
|
+
"title": "Migration revert",
|
3038
|
+
"state": "open",
|
3039
|
+
"pull_request": {
|
3040
|
+
"patch_url": "https://github.com/rails/rails/pull/7280.patch",
|
3041
|
+
"html_url": "https://github.com/rails/rails/pull/7280",
|
3042
|
+
"diff_url": "https://github.com/rails/rails/pull/7280.diff"
|
3043
|
+
},
|
3044
|
+
"number": 7280,
|
3045
|
+
"html_url": "https://github.com/rails/rails/issues/7280",
|
3046
|
+
"updated_at": "2012-08-15T20:53:40Z",
|
3047
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7280",
|
3048
|
+
"assignee": null,
|
3049
|
+
"id": 6068566
|
3050
|
+
},
|
3051
|
+
{
|
3052
|
+
"body": "This allows you to specify the model in a `belongs_to` relationship instead of the foreign key when querying. It does this by looking up the correct foreign key on the association, and changing the column to use that key when appropriate. It came out of a discussion in issue #1736 that seemed to have some interest.\n\nThe following queries are now equivalent:\n\n```ruby\nPost.where(:author_id => Author.first)\nPost.where(:author => Author.first)\n```\n\nI also think it makes it more consistent with `has_many` queries where the relationship and query key are both plural:\n\n```ruby\nposts = Post.containing_the_letter_a.limit(5)\nAuthor.where(:posts => posts)\n```",
|
3053
|
+
"milestone": null,
|
3054
|
+
"labels": [
|
3055
|
+
{
|
3056
|
+
"name": "activerecord",
|
3057
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3058
|
+
"color": "0b02e1"
|
3059
|
+
}
|
3060
|
+
],
|
3061
|
+
"user": {
|
3062
|
+
"gravatar_id": "45b75f9f866d240362c0d7fa125025ba",
|
3063
|
+
"avatar_url": "https://secure.gravatar.com/avatar/45b75f9f866d240362c0d7fa125025ba?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3064
|
+
"login": "beerlington",
|
3065
|
+
"url": "https://api.github.com/users/beerlington",
|
3066
|
+
"id": 77580
|
3067
|
+
},
|
3068
|
+
"closed_at": null,
|
3069
|
+
"created_at": "2012-08-06T01:01:39Z",
|
3070
|
+
"comments": 16,
|
3071
|
+
"title": "Convert model name to foreign key in queries",
|
3072
|
+
"state": "open",
|
3073
|
+
"pull_request": {
|
3074
|
+
"patch_url": "https://github.com/rails/rails/pull/7273.patch",
|
3075
|
+
"html_url": "https://github.com/rails/rails/pull/7273",
|
3076
|
+
"diff_url": "https://github.com/rails/rails/pull/7273.diff"
|
3077
|
+
},
|
3078
|
+
"number": 7273,
|
3079
|
+
"html_url": "https://github.com/rails/rails/issues/7273",
|
3080
|
+
"updated_at": "2012-09-09T14:23:41Z",
|
3081
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7273",
|
3082
|
+
"assignee": null,
|
3083
|
+
"id": 6041238
|
3084
|
+
},
|
3085
|
+
{
|
3086
|
+
"body": "I don't know if this is related to #7174, #7175 or #7227 however with 3.2.8.rc2 I still have problems with it setting environment when it comes to rake spec. I can do `RAILS_ENV=test rake db:migrate` just fine which shows that my database is accessible, I can run rspec just fine, I can also use guard w/spork and it still work just fine, however with rake spec it fails no matter what, even if I do `ENV['RAILS_ENV']= 'test'` in my spec_helper.rb, even if I do `RAILS_ENV=test rake spec` or anything... it fails.\n\n #~ RAILS_ENV=test rake db:migrate\n == CreateEnvygeeks: migrating ================================================\n # Migration info goes here, removed for no reason other then not needed.\n\n #~ RAILS_ENV=test rails c\n Loading test environment (Rails 3.2.8.rc2)\n [1] pry(main)> User.all\n #=> User Load (73.8ms) SELECT \"users\".* FROM \"users\" \n #=> []\n\n [1] pry(main)> ActiveRecord::Base.connection.current_database\n #=> (132.7ms) select current_database()\n #=> \"f72e\"\n\n [2] pry(main)> ENV['WESTAMZ_ENVYGEEKS7_POSTGRES_DATABASE']\n #=> \"f72e\"\n\n #~ cat config/database.yml\n test:\n adapter: postgresql\n encoding: unicode\n pool: 5\n database: <%= ENV['WESTAMZ_ENVYGEEKS7_POSTGRES_DATABASE'] %>\n username: <%= ENV['WESTAMZ_ENVYGEEKS7_POSTGRES_USERNAME'] %>\n password: <%= ENV['WESTAMZ_ENVYGEEKS7_POSTGRES_PASSWORD'] %>\n host: <%= ENV['WESTAMZ_ENVYGEEKS7_POSTGRES_HOSTNAME'] %>\n port: 5432\n\n #~ rake spec\n ** Invoke spec (first_time)\n ** Invoke db:test:prepare (first_time)\n ** Invoke db:abort_if_pending_migrations (first_time) \n ** Invoke environment (first_time)\n ** Execute environment\n ** Invoke db:load_config (first_time)\n ** Execute db:load_config\n ** Execute db:abort_if_pending_migrations\n ** Execute db:test:prepare\n ** Invoke db:test:load (first_time)\n ** Invoke db:test:purge (first_time)\n ** Invoke environment\n ** Invoke db:load_config\n ** Execute db:test:purge\n rake aborted!\n FATAL: permission denied for database \"postgres\"\n DETAIL: User does not have CONNECT privilege.\n /home/jordon/.rvm/gems/ruby-1.9.3-p194@envygeeks/gems/activerecord-3.2.8.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:1213:in `initialize'",
|
3087
|
+
"milestone": null,
|
3088
|
+
"labels": [
|
3089
|
+
{
|
3090
|
+
"name": "activerecord",
|
3091
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3092
|
+
"color": "0b02e1"
|
3093
|
+
}
|
3094
|
+
],
|
3095
|
+
"user": {
|
3096
|
+
"gravatar_id": "37bf689f37c69732158e782020db84f9",
|
3097
|
+
"avatar_url": "https://secure.gravatar.com/avatar/37bf689f37c69732158e782020db84f9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3098
|
+
"login": "envygeeks",
|
3099
|
+
"url": "https://api.github.com/users/envygeeks",
|
3100
|
+
"id": 99763
|
3101
|
+
},
|
3102
|
+
"closed_at": null,
|
3103
|
+
"created_at": "2012-08-05T16:08:52Z",
|
3104
|
+
"comments": 8,
|
3105
|
+
"title": "Rails env = test possibly still not being set properly in 3.2.8.rc2?",
|
3106
|
+
"state": "open",
|
3107
|
+
"pull_request": {
|
3108
|
+
"patch_url": null,
|
3109
|
+
"html_url": null,
|
3110
|
+
"diff_url": null
|
3111
|
+
},
|
3112
|
+
"number": 7271,
|
3113
|
+
"html_url": "https://github.com/rails/rails/issues/7271",
|
3114
|
+
"updated_at": "2012-08-07T14:06:50Z",
|
3115
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7271",
|
3116
|
+
"assignee": null,
|
3117
|
+
"id": 6038031
|
3118
|
+
},
|
3119
|
+
{
|
3120
|
+
"body": "Hi.\nI have found a bug that has_many dependant destroy don't destroy all child records.\n\n```ruby\nclass Post < ActiveRecord::Base\n has_many :comments, :dependent => :destroy\nend\n\nclass Comment < ActiveRecord::Base\n belongs_to :post\n before_destroy do\n false\n end\nend\n\npost = Post.create(title: \"new post\")\npost.comments << Comment.create(body: \"hello\")\npost.destroy\np Post.all #=> []\np Comment.all #=> [#<Comment id: 980190963, body: \"hello\", post_id: 980190963, created_at: \"2012-08-05 10:31:37\", updated_at: \"2012-08-05 10:31:37\">]\n```\n\nI add a judge all records is deleted into has_many dependent callback.\n\nThanks.\n",
|
3121
|
+
"milestone": null,
|
3122
|
+
"labels": [
|
3123
|
+
{
|
3124
|
+
"name": "activerecord",
|
3125
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3126
|
+
"color": "0b02e1"
|
3127
|
+
}
|
3128
|
+
],
|
3129
|
+
"user": {
|
3130
|
+
"gravatar_id": "aa452bc2667982dabd920ce1af0d8710",
|
3131
|
+
"avatar_url": "https://secure.gravatar.com/avatar/aa452bc2667982dabd920ce1af0d8710?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3132
|
+
"login": "yalab",
|
3133
|
+
"url": "https://api.github.com/users/yalab",
|
3134
|
+
"id": 64558
|
3135
|
+
},
|
3136
|
+
"closed_at": null,
|
3137
|
+
"created_at": "2012-08-05T10:48:10Z",
|
3138
|
+
"comments": 7,
|
3139
|
+
"title": "Fix a bug that has_many dependent: destroy not delete child records ",
|
3140
|
+
"state": "open",
|
3141
|
+
"pull_request": {
|
3142
|
+
"patch_url": "https://github.com/rails/rails/pull/7267.patch",
|
3143
|
+
"html_url": "https://github.com/rails/rails/pull/7267",
|
3144
|
+
"diff_url": "https://github.com/rails/rails/pull/7267.diff"
|
3145
|
+
},
|
3146
|
+
"number": 7267,
|
3147
|
+
"html_url": "https://github.com/rails/rails/issues/7267",
|
3148
|
+
"updated_at": "2012-08-27T15:16:31Z",
|
3149
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7267",
|
3150
|
+
"assignee": null,
|
3151
|
+
"id": 6036098
|
3152
|
+
},
|
3153
|
+
{
|
3154
|
+
"body": "According to documentation you should be able to pass something like this as a collection:\n\n```ruby\n options_for_select([ \"Denmark\", [\"USA\", {:class => 'bold'}], \"Sweden\" ], [\"USA\", \"Sweden\"])\n````\n\nand get this HTML\n\n```html\n <option value=\"Denmark\">Denmark</option>\n <option value=\"USA\" class=\"bold\" selected=\"selected\">USA</option>\n <option value=\"Sweden\" selected=\"selected\">Sweden</option>\n```\n\n> copy from actionpack/lib/action_view/helpers/form_options_helper.rb line 308\n\nbut when you do it from collection_select the :value_method by default is :last\nthis commit fix it and re-enable the html option for option tag\n\ncoauthored by [fedesoria](https://github.com/fedesoria) - [ovargas27](https://github.com/ovargas27)",
|
3155
|
+
"milestone": null,
|
3156
|
+
"labels": [
|
3157
|
+
{
|
3158
|
+
"name": "actionview",
|
3159
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionview",
|
3160
|
+
"color": "d7e102"
|
3161
|
+
}
|
3162
|
+
],
|
3163
|
+
"user": {
|
3164
|
+
"gravatar_id": "433031df4018635dfb177f4066c37a3b",
|
3165
|
+
"avatar_url": "https://secure.gravatar.com/avatar/433031df4018635dfb177f4066c37a3b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3166
|
+
"login": "ovargas27",
|
3167
|
+
"url": "https://api.github.com/users/ovargas27",
|
3168
|
+
"id": 128294
|
3169
|
+
},
|
3170
|
+
"closed_at": null,
|
3171
|
+
"created_at": "2012-08-04T20:51:19Z",
|
3172
|
+
"comments": 1,
|
3173
|
+
"title": "Allow html options on option tag",
|
3174
|
+
"state": "open",
|
3175
|
+
"pull_request": {
|
3176
|
+
"patch_url": "https://github.com/rails/rails/pull/7264.patch",
|
3177
|
+
"html_url": "https://github.com/rails/rails/pull/7264",
|
3178
|
+
"diff_url": "https://github.com/rails/rails/pull/7264.diff"
|
3179
|
+
},
|
3180
|
+
"number": 7264,
|
3181
|
+
"html_url": "https://github.com/rails/rails/issues/7264",
|
3182
|
+
"updated_at": "2012-08-04T20:59:54Z",
|
3183
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7264",
|
3184
|
+
"assignee": null,
|
3185
|
+
"id": 6032744
|
3186
|
+
},
|
3187
|
+
{
|
3188
|
+
"body": "Using jruby 1.7, Windows 7, Rails 3.2.6\n\nWhen using config.reload_classes_only_on_change = true the checking of whether to reload a class takes a long time. This is likely as much a windows Issue as it is a Rails Issues, however it may be feasible to work around the issue. \n\nThe Issue:\n\nOn each request, including simple image requests, the file structure is scanned to see if any files have been added or updated. This scan is very slow on Windows. It is fine on the Mac and Linux. \n\nThe following line takes about 1/2 second per call with only about 10 folders in the list. \n\nhttps://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/file_update_checker.rb#L99\n\n```\n def updated_at #:nodoc:\n @updated_at || begin\n all = []\n all.concat @files.select { |f| File.exists?(f) }\n all.concat Dir[@glob] if @glob #THIS LINE IS VERY SLOW\n all.map { |path| File.mtime(path) }.max || Time.at(0)\n end\n end\n```\n\nA possible solution is to cache the folders and only update them to include new files after a few seconds have elapsed. This code is possibly not thread safe, I am just providing it for an example. A single request that loads 20 images will now take a second or two to load instead of 10 seconds. \n\n```\n def initialize(files, dirs={}, &block)\n @files = files\n @glob = compile_glob(dirs)\n @block = block\n @updated_at = nil\n @last_update_at = updated_at\n @check_new_at = Time.now + 5.seconds\n @dir_cache = Dir[@glob] if @glob\n end\n\n def updated_at #:nodoc:\n @updated_at || begin\n all = []\n all.concat @files.select { |f| File.exists?(f) }\n if !@check_new_at.nil? && Time.now > @check_new_at\n @dir_cache = Dir[@glob] if @glob\n @check_new_at = Time.now + 5.seconds\n end\n all.concat @dir_cache if @dir_cache\n finish = Time.now\n all.map { |path| File.mtime(path) }.max || Time.at(0)\n end \n end\n\n```\nOnce you have the file list (with only 113 file in it on my project) then it is very fast to actually check the file timestamps for changes. \n\nOther comments:\n\nThis is about 4 times worse on JRUBY 1.7 than JRUBY 1.6 for me. It is probably related to bug: \nhttp://jira.codehaus.org/browse/JRUBY-6803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel\n\nIf you precompile your assets the problem goes away, but then you have to recompile them when doing development in the view all the time. \n\nOn the mac this code is being executed for every image too, it is just that the problem is less severe as it is about 10 times faster. By using this fix the speed is still considerably improved. \n\nAnother possibility for my project is to reduce the number of assets by using image strips/sprite sheets. I'll look into this too.\n\n\n\n",
|
3189
|
+
"milestone": null,
|
3190
|
+
"labels": [
|
3191
|
+
|
3192
|
+
],
|
3193
|
+
"user": {
|
3194
|
+
"gravatar_id": "cf68437477bc7ff6b62db027b65745a8",
|
3195
|
+
"avatar_url": "https://secure.gravatar.com/avatar/cf68437477bc7ff6b62db027b65745a8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3196
|
+
"login": "simonjsmithuk",
|
3197
|
+
"url": "https://api.github.com/users/simonjsmithuk",
|
3198
|
+
"id": 1372168
|
3199
|
+
},
|
3200
|
+
"closed_at": null,
|
3201
|
+
"created_at": "2012-08-03T17:22:44Z",
|
3202
|
+
"comments": 0,
|
3203
|
+
"title": "Rails 3.2.6 caching is inefficient on Windows ",
|
3204
|
+
"state": "open",
|
3205
|
+
"pull_request": {
|
3206
|
+
"patch_url": null,
|
3207
|
+
"html_url": null,
|
3208
|
+
"diff_url": null
|
3209
|
+
},
|
3210
|
+
"number": 7254,
|
3211
|
+
"html_url": "https://github.com/rails/rails/issues/7254",
|
3212
|
+
"updated_at": "2012-08-03T17:22:44Z",
|
3213
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7254",
|
3214
|
+
"assignee": null,
|
3215
|
+
"id": 6019428
|
3216
|
+
},
|
3217
|
+
{
|
3218
|
+
"body": "This integrate strong_parameters plugin in Rails core and remove attr_accessible/attr_protected.",
|
3219
|
+
"milestone": null,
|
3220
|
+
"labels": [
|
3221
|
+
{
|
3222
|
+
"name": "actionpack",
|
3223
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
3224
|
+
"color": "FFF700"
|
3225
|
+
},
|
3226
|
+
{
|
3227
|
+
"name": "activemodel",
|
3228
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activemodel",
|
3229
|
+
"color": "00E5FF"
|
3230
|
+
},
|
3231
|
+
{
|
3232
|
+
"name": "activerecord",
|
3233
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3234
|
+
"color": "0b02e1"
|
3235
|
+
}
|
3236
|
+
],
|
3237
|
+
"user": {
|
3238
|
+
"gravatar_id": "73d57855a3bfe5c534596197a895ab6e",
|
3239
|
+
"avatar_url": "https://secure.gravatar.com/avatar/73d57855a3bfe5c534596197a895ab6e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3240
|
+
"login": "guilleiguaran",
|
3241
|
+
"url": "https://api.github.com/users/guilleiguaran",
|
3242
|
+
"id": 160941
|
3243
|
+
},
|
3244
|
+
"closed_at": null,
|
3245
|
+
"created_at": "2012-08-03T14:12:03Z",
|
3246
|
+
"comments": 14,
|
3247
|
+
"title": "Integrate strong_parameters in Rails 4",
|
3248
|
+
"state": "open",
|
3249
|
+
"pull_request": {
|
3250
|
+
"patch_url": "https://github.com/rails/rails/pull/7251.patch",
|
3251
|
+
"html_url": "https://github.com/rails/rails/pull/7251",
|
3252
|
+
"diff_url": "https://github.com/rails/rails/pull/7251.diff"
|
3253
|
+
},
|
3254
|
+
"number": 7251,
|
3255
|
+
"html_url": "https://github.com/rails/rails/issues/7251",
|
3256
|
+
"updated_at": "2012-09-10T07:29:53Z",
|
3257
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7251",
|
3258
|
+
"assignee": null,
|
3259
|
+
"id": 6015551
|
3260
|
+
},
|
3261
|
+
{
|
3262
|
+
"body": "please see workaround https://github.com/svenfuchs/routing-filter/pull/40\nthe above pull request escapes the weird values in Mime::EXTENSION_LOOKUP when reading the contents of Mime::EXTENSION_LOOKUP. Ideally they should not be present at all, or at least values should be escaped when added to the EXTENSION_LOOKUP Hash in actionpack-2.3.14/lib/action_controller/mime_type.rb:85\n \nInterested to hear your thoughts.",
|
3263
|
+
"milestone": null,
|
3264
|
+
"labels": [
|
3265
|
+
{
|
3266
|
+
"name": "actionpack",
|
3267
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
3268
|
+
"color": "FFF700"
|
3269
|
+
}
|
3270
|
+
],
|
3271
|
+
"user": {
|
3272
|
+
"gravatar_id": "8a3b6bb059d74617e891873bd4f0517c",
|
3273
|
+
"avatar_url": "https://secure.gravatar.com/avatar/8a3b6bb059d74617e891873bd4f0517c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3274
|
+
"login": "debreczeni",
|
3275
|
+
"url": "https://api.github.com/users/debreczeni",
|
3276
|
+
"id": 586785
|
3277
|
+
},
|
3278
|
+
"closed_at": null,
|
3279
|
+
"created_at": "2012-08-03T12:00:38Z",
|
3280
|
+
"comments": 2,
|
3281
|
+
"title": "Weird unescaped values in Mime type lookup",
|
3282
|
+
"state": "open",
|
3283
|
+
"pull_request": {
|
3284
|
+
"patch_url": null,
|
3285
|
+
"html_url": null,
|
3286
|
+
"diff_url": null
|
3287
|
+
},
|
3288
|
+
"number": 7248,
|
3289
|
+
"html_url": "https://github.com/rails/rails/issues/7248",
|
3290
|
+
"updated_at": "2012-08-05T08:12:37Z",
|
3291
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7248",
|
3292
|
+
"assignee": null,
|
3293
|
+
"id": 6013267
|
3294
|
+
},
|
3295
|
+
{
|
3296
|
+
"body": "This is a reopen of #618 (import of https://rails.lighthouseapp.com/projects/8994/tickets/2646)\n\nI am just upgrading my rails app to rails 3.2 and I have just discovered that the workaround suggested by Matt Jones:\n```ruby\n if value.reject { |v| v.marked_for_destruction? }.size < 1\n```\nIs still needed...\n\nThere are patches (for tests) that demonstrates the problem...",
|
3297
|
+
"milestone": null,
|
3298
|
+
"labels": [
|
3299
|
+
{
|
3300
|
+
"name": "activerecord",
|
3301
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3302
|
+
"color": "0b02e1"
|
3303
|
+
}
|
3304
|
+
],
|
3305
|
+
"user": {
|
3306
|
+
"gravatar_id": "968fba3ba6e5df2df68a458218be7104",
|
3307
|
+
"avatar_url": "https://secure.gravatar.com/avatar/968fba3ba6e5df2df68a458218be7104?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3308
|
+
"login": "jarl-dk",
|
3309
|
+
"url": "https://api.github.com/users/jarl-dk",
|
3310
|
+
"id": 191521
|
3311
|
+
},
|
3312
|
+
"closed_at": null,
|
3313
|
+
"created_at": "2012-08-03T08:45:34Z",
|
3314
|
+
"comments": 13,
|
3315
|
+
"title": "validations not called when model updating using nested attributes",
|
3316
|
+
"state": "open",
|
3317
|
+
"pull_request": {
|
3318
|
+
"patch_url": null,
|
3319
|
+
"html_url": null,
|
3320
|
+
"diff_url": null
|
3321
|
+
},
|
3322
|
+
"number": 7247,
|
3323
|
+
"html_url": "https://github.com/rails/rails/issues/7247",
|
3324
|
+
"updated_at": "2012-09-02T14:43:37Z",
|
3325
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7247",
|
3326
|
+
"assignee": null,
|
3327
|
+
"id": 6010383
|
3328
|
+
},
|
3329
|
+
{
|
3330
|
+
"body": "Due to caching, `ActiveSupport::TimeZone.all` returns different results if a non-ActiveSupport-supported zone was looked up first. \n\n````\nActiveSupport::TimeZone.all\n# not in ActiveSupport::TimeZone::MAPPING, but still a valid zone\nchicago = ActiveSupport::TimeZone['America/Chicago']\nActiveSupport::TimeZone.all.include?(chicago)\n=> false\n````\n\n````\nchicago = ActiveSupport::TimeZone['America/Chicago']\nActiveSupport::TimeZone.all.include?(chicago)\n=> true\n````\n\nThis affects `time_zone_options_for_select`, in that the `selected` arg of that function is a string matched to the names of zones in `ActiveSupport::TimeZone.all`. If your app stores timezones in TZInfo format, the helper may not generate an option tag for a recognized zone.\n\nI see two ways around this:\n1. Change the helper to recognize TZInfo identifiers\n2. Update the zones cache when lazy-loading time zones.\n\nChanging the helper might unintentionally change your data (\"America/Chicago\" would get converted to \"Central Time\"). It seems like Rails is opinionated about what zones it wants to use, so that might not be a big deal. The second approach avoids that problem, but still requires you to look up the alternate zone before it shows up in the list.\n\nThoughts?",
|
3331
|
+
"milestone": null,
|
3332
|
+
"labels": [
|
3333
|
+
{
|
3334
|
+
"name": "activesupport",
|
3335
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activesupport",
|
3336
|
+
"color": "FC9300"
|
3337
|
+
}
|
3338
|
+
],
|
3339
|
+
"user": {
|
3340
|
+
"gravatar_id": "07b2f492576e74e01dbe801cec562074",
|
3341
|
+
"avatar_url": "https://secure.gravatar.com/avatar/07b2f492576e74e01dbe801cec562074?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3342
|
+
"login": "wonnage",
|
3343
|
+
"url": "https://api.github.com/users/wonnage",
|
3344
|
+
"id": 125177
|
3345
|
+
},
|
3346
|
+
"closed_at": null,
|
3347
|
+
"created_at": "2012-08-03T01:20:57Z",
|
3348
|
+
"comments": 1,
|
3349
|
+
"title": "Inconsistent output from ActiveSupport::TimeZone.all",
|
3350
|
+
"state": "open",
|
3351
|
+
"pull_request": {
|
3352
|
+
"patch_url": null,
|
3353
|
+
"html_url": null,
|
3354
|
+
"diff_url": null
|
3355
|
+
},
|
3356
|
+
"number": 7245,
|
3357
|
+
"html_url": "https://github.com/rails/rails/issues/7245",
|
3358
|
+
"updated_at": "2012-08-26T20:14:47Z",
|
3359
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7245",
|
3360
|
+
"assignee": null,
|
3361
|
+
"id": 6006282
|
3362
|
+
},
|
3363
|
+
{
|
3364
|
+
"body": "Given an ActiveRecord model like:\n\n class Topic < ActiveRecord::Base\n def empty?\n true # actual implementation may be on stories in topic or similar\n end\n end\n\nCalling a method like find_by_name(\"A topic\") will successfully return the topic, whereas the bang version, find_by_name!(\"A topic\"), will raise a RecordNotFound exception. This is due to find_by_attributes checking result.blank? instead of result.nil?",
|
3365
|
+
"milestone": null,
|
3366
|
+
"labels": [
|
3367
|
+
{
|
3368
|
+
"name": "activerecord",
|
3369
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3370
|
+
"color": "0b02e1"
|
3371
|
+
}
|
3372
|
+
],
|
3373
|
+
"user": {
|
3374
|
+
"gravatar_id": "11364e09c2ea04444314e94eead06e98",
|
3375
|
+
"avatar_url": "https://secure.gravatar.com/avatar/11364e09c2ea04444314e94eead06e98?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3376
|
+
"login": "knaveofdiamonds",
|
3377
|
+
"url": "https://api.github.com/users/knaveofdiamonds",
|
3378
|
+
"id": 11308
|
3379
|
+
},
|
3380
|
+
"closed_at": null,
|
3381
|
+
"created_at": "2012-08-02T15:46:38Z",
|
3382
|
+
"comments": 2,
|
3383
|
+
"title": "find_by_ bang methods break if the model has an empty? method on Rails 3-2-x",
|
3384
|
+
"state": "open",
|
3385
|
+
"pull_request": {
|
3386
|
+
"patch_url": null,
|
3387
|
+
"html_url": null,
|
3388
|
+
"diff_url": null
|
3389
|
+
},
|
3390
|
+
"number": 7238,
|
3391
|
+
"html_url": "https://github.com/rails/rails/issues/7238",
|
3392
|
+
"updated_at": "2012-08-02T15:59:09Z",
|
3393
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7238",
|
3394
|
+
"assignee": null,
|
3395
|
+
"id": 5995271
|
3396
|
+
},
|
3397
|
+
{
|
3398
|
+
"body": "was crashing under puma, needed to ensure we always get an ip even if we are being served over a unix sock where remote_addr is empty",
|
3399
|
+
"milestone": null,
|
3400
|
+
"labels": [
|
3401
|
+
{
|
3402
|
+
"name": "actionpack",
|
3403
|
+
"url": "https://api.github.com/repos/rails/rails/labels/actionpack",
|
3404
|
+
"color": "FFF700"
|
3405
|
+
}
|
3406
|
+
],
|
3407
|
+
"user": {
|
3408
|
+
"gravatar_id": "3dcae8378d46c244172a115c28ca49ce",
|
3409
|
+
"avatar_url": "https://secure.gravatar.com/avatar/3dcae8378d46c244172a115c28ca49ce?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3410
|
+
"login": "SamSaffron",
|
3411
|
+
"url": "https://api.github.com/users/SamSaffron",
|
3412
|
+
"id": 5213
|
3413
|
+
},
|
3414
|
+
"closed_at": null,
|
3415
|
+
"created_at": "2012-08-02T08:43:55Z",
|
3416
|
+
"comments": 1,
|
3417
|
+
"title": "remote_ip was failing under unix socks (puma)",
|
3418
|
+
"state": "open",
|
3419
|
+
"pull_request": {
|
3420
|
+
"patch_url": "https://github.com/rails/rails/pull/7234.patch",
|
3421
|
+
"html_url": "https://github.com/rails/rails/pull/7234",
|
3422
|
+
"diff_url": "https://github.com/rails/rails/pull/7234.diff"
|
3423
|
+
},
|
3424
|
+
"number": 7234,
|
3425
|
+
"html_url": "https://github.com/rails/rails/issues/7234",
|
3426
|
+
"updated_at": "2012-08-02T11:36:01Z",
|
3427
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7234",
|
3428
|
+
"assignee": null,
|
3429
|
+
"id": 5987396
|
3430
|
+
},
|
3431
|
+
{
|
3432
|
+
"body": "I have 2 models like the following\n\n\n Class Post \n has_many :comments, :dependent => :destroy \n end \n\n Class Comment \n validates_presence_of :post\n validates_presence_of :comment\n belongs_to :post \n end \n \nIn Comments controller,\n\n def create\n comment = @post.comments.new(params[:comment])\n if comment.save\n // some code\n else\n // some code\n end\n end\n\n\nroutes.rb\n\n resources :posts\n\n resources :posts do\n resources :comments\n end\n \n resources :comments\n\n\n\nWhen the comment is invalid as per the validation, the comment is not saved. But when the @post object is accessed in the view, it contains a comment object with nil id. This did not happen in Rails 2.3.11. We are upgraded to Rails 3.1 and then now to Rails 3.2. This comment object with nil id disappears when I do @post.reload. \n\nI tried to interchange build and new methods. It had the same result as build. Is it the expected behavior or is any of my gems or plugins creating this issue?",
|
3433
|
+
"milestone": null,
|
3434
|
+
"labels": [
|
3435
|
+
{
|
3436
|
+
"name": "activerecord",
|
3437
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3438
|
+
"color": "0b02e1"
|
3439
|
+
}
|
3440
|
+
],
|
3441
|
+
"user": {
|
3442
|
+
"gravatar_id": "5e146b951812217810e32cc5468399e8",
|
3443
|
+
"avatar_url": "https://secure.gravatar.com/avatar/5e146b951812217810e32cc5468399e8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3444
|
+
"login": "arunn",
|
3445
|
+
"url": "https://api.github.com/users/arunn",
|
3446
|
+
"id": 389262
|
3447
|
+
},
|
3448
|
+
"closed_at": null,
|
3449
|
+
"created_at": "2012-08-01T18:28:52Z",
|
3450
|
+
"comments": 0,
|
3451
|
+
"title": "build_association method does not rollback parent correctly if child fails to save",
|
3452
|
+
"state": "open",
|
3453
|
+
"pull_request": {
|
3454
|
+
"patch_url": null,
|
3455
|
+
"html_url": null,
|
3456
|
+
"diff_url": null
|
3457
|
+
},
|
3458
|
+
"number": 7229,
|
3459
|
+
"html_url": "https://github.com/rails/rails/issues/7229",
|
3460
|
+
"updated_at": "2012-08-01T18:28:52Z",
|
3461
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7229",
|
3462
|
+
"assignee": null,
|
3463
|
+
"id": 5974887
|
3464
|
+
},
|
3465
|
+
{
|
3466
|
+
"body": "All klass.connection and @klass.connection are now just connection, which is delegated to klass. Tests are passing. find_by_sql and count_by_sql are AR::Relation methods.\n\nThis should fully fix #6331.\n\nThis patch will also give an opportunity to implement something like:\n\nPost.connection(external_database).all\n\n\n",
|
3467
|
+
"milestone": null,
|
3468
|
+
"labels": [
|
3469
|
+
{
|
3470
|
+
"name": "activerecord",
|
3471
|
+
"url": "https://api.github.com/repos/rails/rails/labels/activerecord",
|
3472
|
+
"color": "0b02e1"
|
3473
|
+
}
|
3474
|
+
],
|
3475
|
+
"user": {
|
3476
|
+
"gravatar_id": "2a3e5e19a0d90edfd4eb094385f6617a",
|
3477
|
+
"avatar_url": "https://secure.gravatar.com/avatar/2a3e5e19a0d90edfd4eb094385f6617a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
|
3478
|
+
"login": "kot-begemot",
|
3479
|
+
"url": "https://api.github.com/users/kot-begemot",
|
3480
|
+
"id": 780077
|
3481
|
+
},
|
3482
|
+
"closed_at": null,
|
3483
|
+
"created_at": "2012-08-01T11:09:17Z",
|
3484
|
+
"comments": 2,
|
3485
|
+
"title": "ActiveRecord::Relation select problem",
|
3486
|
+
"state": "open",
|
3487
|
+
"pull_request": {
|
3488
|
+
"patch_url": "https://github.com/rails/rails/pull/7221.patch",
|
3489
|
+
"html_url": "https://github.com/rails/rails/pull/7221",
|
3490
|
+
"diff_url": "https://github.com/rails/rails/pull/7221.diff"
|
3491
|
+
},
|
3492
|
+
"number": 7221,
|
3493
|
+
"html_url": "https://github.com/rails/rails/issues/7221",
|
3494
|
+
"updated_at": "2012-08-01T16:31:08Z",
|
3495
|
+
"url": "https://api.github.com/repos/rails/rails/issues/7221",
|
3496
|
+
"assignee": null,
|
3497
|
+
"id": 5965522
|
3498
|
+
}
|
3499
|
+
]
|
3500
|
+
}
|