質問編集履歴

3 追記

退会済みユーザー

退会済みユーザー

2015/06/23 20:20  投稿

Rails4.2 iPhoneのブラウザから更新すると全てのアイテムが更新されてしまう
herokuにアプリをアップしました。
macbookのsafariからテストした時は問題なかったのですが、iPhoneからsafariとchromeテストした際に下記の問題が起きました。
Item modelでitemをcreateするとユーザが過去にcreateした全てのアイテムの画像(picture_1のみ)が更新されてしまいます。
新規でcreateしたitem自体はpicture_1とpicture_2が両方ともpicture_2の画像にに差し代わってしまいます。
原因が全くわかりません
```lang-<ruby>
def create
   @item = current_user.items.build(item_params)
   respond_to do |format|
     if @item.save
       format.html { redirect_to items_continue_url, notice: 'アイテムを登録しました' }
       format.json { render :show, status: :created, location: @item }
     else
       format.html { render :new }
       format.json { render json: @item.errors, status: :unprocessable_entity }
     end
   end
 end
```
 
 
PictureUploaderを下記に変更  
```lang-<ruby>
def filename  
   "#{secure_token}.png" if original_filename.present?  
end  
2015-06-21T04:57:50.122039+00:00 app[web.1]: Started GET "/categories/4/sub_categories" for 221.133.90.90 at 2015-06-21 04:57:50 +0000
2015-06-21T04:58:57.552332+00:00 app[web.1]: Started POST "/items" for 221.133.90.90 at 2015-06-21 04:58:57 +0000
2015-06-21T04:58:57.560891+00:00 app[web.1]:  Category Load (0.5ms) SELECT "categories".* FROM "categories" WHERE "categories"."name" = $1 LIMIT 1 [["name", "root"]]
2015-06-21T04:58:57.554902+00:00 app[web.1]: Processing by ItemsController#create as HTML
2015-06-21T04:58:57.555006+00:00 app[web.1]:  Parameters: {"utf8"=>"✓", "authenticity_token"=>"GlkuJs8kRutr7DkJNTIXZGltATv16Z7SlduPQUcu81EEhFQzRqRss7/6sJ2Py4F/bOFRy77kDSZhI6T8gGSfUQ==", "item"=>{"category_id"=>"4", "sub_category_id"=>"46", "picture_1"=>#<ActionDispatch::Http::UploadedFile:0x007fdea5c33c88 @tempfile=#<Tempfile:/tmp/RackMultipart20150621-3-1pvqgj7.jpg>, @original_filename="image.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name="item[picture_1]"; filename="image.jpg"rnContent-Type: image/jpegrn">, "picture_1_cache"=>"", "picture_2_cache"=>"", "picture_3_cache"=>"", "picture_4_cache"=>"", "title"=>"66666666666", "content"=>"っっっっっっっっっっっg", "condition_id"=>"1", "delivery"=>"false", "area"=>"1", "limit_day"=>"2015-06-27 13:58"}, "commit"=>"出品する"}
2015-06-21T04:58:57.558263+00:00 app[web.1]:  User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2015-06-21T04:58:58.593921+00:00 app[web.1]:   (0.7ms) BEGIN
2015-06-21T04:58:58.608082+00:00 app[web.1]:  SQL (1.6ms) INSERT INTO "warrants" ("holder_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["holder_id", 1], ["item_id", 11], ["created_at", "2015-06-21 04:58:58.604974"], ["updated_at", "2015-06-21 04:58:58.604974"]]
2015-06-21T04:58:58.603937+00:00 app[web.1]:  SQL (0.9ms) INSERT INTO "items" ("title", "condition_id", "content", "area", "limit_day", "delivery", "category_id", "sub_category_id", "picture_1", "user_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["title", "66666666666"], ["condition_id", 1], ["content", "っっっっっっっっっっっg"], ["area", 1], ["limit_day", "2015-06-27 04:58:00.000000"], ["delivery", "f"], ["category_id", 4], ["sub_category_id", 46], ["picture_1", "image.jpg"], ["user_id", 1], ["created_at", "2015-06-21 04:58:58.597097"], ["updated_at", "2015-06-21 04:58:58.597097"]]
2015-06-21T04:59:01.528032+00:00 heroku[router]: at=info method=POST path="/items" host=ponta.herokuapp.com request_id=d8599bc7-e1fb-4aeb-a9f2-9cb6a151db14 fwd="221.133.90.90" dyno=web.1 connect=2ms service=5249ms status=302 bytes=1339
2015-06-21T04:59:01.513588+00:00 app[web.1]:   (1.4ms) COMMIT
2015-06-21T04:59:01.518359+00:00 app[web.1]: Redirected to https://ponta.herokuapp.com/items/continue
2015-06-21T04:59:01.516213+00:00 app[web.1]:  User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 LIMIT 1 [["id", 1]]
2015-06-21T04:59:01.519916+00:00 app[web.1]: Completed 302 Found in 3965ms (ActiveRecord: 6.6ms)
2015-06-21T04:59:01.884980+00:00 app[web.1]: Started GET "/items/continue" for 221.133.90.90 at 2015-06-21 04:59:01 +0000
2015-06-21T04:59:01.894359+00:00 app[web.1]:  User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2015-06-21T04:59:01.902755+00:00 app[web.1]:  Rendered items/continue.html.erb within layouts/application (1.4ms)
2015-06-21T04:59:01.917097+00:00 app[web.1]:  Notification Load (0.7ms) SELECT "notifications".* FROM "notifications" WHERE "notifications"."recipient_id" = 1 AND "notifications"."status" = 'f'
2015-06-21T04:59:01.928591+00:00 app[web.1]:  Profile Load (0.6ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."user_id" = $1 LIMIT 1 [["user_id", 1]]
2015-06-21T04:59:01.933674+00:00 app[web.1]: Completed 200 OK in 44ms (Views: 29.8ms | ActiveRecord: 5.3ms)
2015-06-21T04:59:01.889764+00:00 app[web.1]: Processing by ItemsController#continue as HTML
2015-06-21T04:59:01.899011+00:00 app[web.1]:  Category Load (0.9ms) SELECT "categories".* FROM "categories" WHERE "categories"."name" = $1 LIMIT 1 [["name", "root"]]
2015-06-21T04:59:01.913214+00:00 app[web.1]:  Todo Load (1.6ms) SELECT "todos".* FROM "todos" WHERE ((exhibitor_id = 1 AND status = 'f') OR (proprietor_id = 1 AND status = 'f'))
2015-06-21T04:59:01.921099+00:00 app[web.1]:  Category Load (0.7ms) SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" = $1 [["parent_id", 1]]
2015-06-21T04:59:01.933021+00:00 app[web.1]:  Rendered ideas/_form.html.erb (2.1ms)
2015-06-21T04:59:01.944598+00:00 heroku[router]: at=info method=GET path="/items/continue" host=ponta.herokuapp.com request_id=5bf129f9-f189-4bca-a3b4-9e8472783cb4 fwd="221.133.90.90" dyno=web.1 connect=1ms service=66ms status=200 bytes=13488
2015-06-21T04:59:02.603671+00:00 heroku[router]: at=info method=GET path="/assets/opps.jpg" host=ponta.herokuapp.com request_id=9a5516b9-9af0-4988-b3da-3b5e260643d8 fwd="221.133.90.90" dyno=web.1 connect=9ms service=19ms status=304 bytes=343
2015-06-21T04:59:02.589854+00:00 app[web.1]: Started GET "/assets/opps.jpg" for 221.133.90.90 at 2015-06-21 04:59:02 +0000
2015-06-21T04:59:03.437611+00:00 app[web.1]: Started GET "/assets/lato/lato-regular.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.447752+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-regular.woff" host=ponta.herokuapp.com request_id=b99c9f00-22e5-40f7-a197-f4beefcf32e5 fwd="221.133.90.90" dyno=web.1 connect=2ms service=11ms status=304 bytes=343
2015-06-21T04:59:03.900702+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-light.woff" host=ponta.herokuapp.com request_id=3085f989-4737-4631-a8a6-978283a762ef fwd="221.133.90.90" dyno=web.1 connect=9ms service=15ms status=304 bytes=343
2015-06-21T04:59:03.898327+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-bold.woff" host=ponta.herokuapp.com request_id=83fb3a02-f42b-4b64-a03e-ed71e93d551b fwd="221.133.90.90" dyno=web.1 connect=2ms service=6ms status=304 bytes=343
2015-06-21T04:59:03.909771+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-black.woff" host=ponta.herokuapp.com request_id=f3a1b687-ba75-4ff3-a48c-f16be0bab00e fwd="221.133.90.90" dyno=web.1 connect=2ms service=7ms status=304 bytes=343
2015-06-21T04:59:03.885385+00:00 app[web.1]: Started GET "/assets/lato/lato-light.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.903886+00:00 app[web.1]: Started GET "/assets/lato/lato-black.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.892069+00:00 app[web.1]: Started GET "/assets/lato/lato-bold.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.915291+00:00 app[web.1]: Started GET "/assets/glyphicons/flat-ui-icons-regular.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.922423+00:00 heroku[router]: at=info method=GET path="/assets/glyphicons/flat-ui-icons-regular.woff" host=ponta.herokuapp.com request_id=bc4e264a-79e8-45a5-8031-7ec6f48c42f5 fwd="221.133.90.90" dyno=web.1 connect=1ms service=6ms status=304 bytes=343
protected
 def secure_token
   var = :"@#{mounted_as}_secure_token"
   model.instance_variable_get(var) or model.instance_variable_set(var, SecureRandom.uuid)
 end
```
 
以前のコード  
 
```lang-<ruby>  
def filename  
   "#{Time.now.strftime('%Y%m%d%H%M%S')}.jpg"  
end  
```
  • Ruby on Rails

    9310 questions

    Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

2 追記

退会済みユーザー

退会済みユーザー

2015/06/23 14:01  投稿

Rails4.2 iPhoneのsafariから更新すると全てのアイテムが更新されてしまう
Rails4.2 iPhoneのブラウザから更新すると全てのアイテムが更新されてしまう
herokuにアプリをアップしました。
macbookからテストした時は問題なかったのですが、iPhoneのsafariでのテストで下記の問題が起きました。
herokuにアプリをアップしました。
macbookのsafariからテストした時は問題なかったのですが、iPhoneからsafariとchromeテストした際に下記の問題が起きました。
Item modelでitemをcreateするとユーザが過去にcreateした全てのアイテムの画像(picture_1)が更新され、新規でcreateしたものに差し代わってしまう。
Item modelでitemをcreateするとユーザが過去にcreateした全てのアイテムの画像(picture_1のみ)が更新されてしまいます。
新規でcreateしたitem自体はpicture_1とpicture_2が両方ともpicture_2の画像にに差し代わってしまいます。
原因が全くわかりません
```lang-<ruby>
def create
   @item = current_user.items.build(item_params)
   respond_to do |format|
     if @item.save
       format.html { redirect_to items_continue_url, notice: 'アイテムを登録しました' }
       format.json { render :show, status: :created, location: @item }
     else
       format.html { render :new }
       format.json { render json: @item.errors, status: :unprocessable_entity }
     end
   end
 end
```
```lang-<ruby>
2015-06-21T04:57:50.122039+00:00 app[web.1]: Started GET "/categories/4/sub_categories" for 221.133.90.90 at 2015-06-21 04:57:50 +0000
2015-06-21T04:58:57.552332+00:00 app[web.1]: Started POST "/items" for 221.133.90.90 at 2015-06-21 04:58:57 +0000
2015-06-21T04:58:57.560891+00:00 app[web.1]:  Category Load (0.5ms) SELECT "categories".* FROM "categories" WHERE "categories"."name" = $1 LIMIT 1 [["name", "root"]]
2015-06-21T04:58:57.554902+00:00 app[web.1]: Processing by ItemsController#create as HTML
2015-06-21T04:58:57.555006+00:00 app[web.1]:  Parameters: {"utf8"=>"✓", "authenticity_token"=>"GlkuJs8kRutr7DkJNTIXZGltATv16Z7SlduPQUcu81EEhFQzRqRss7/6sJ2Py4F/bOFRy77kDSZhI6T8gGSfUQ==", "item"=>{"category_id"=>"4", "sub_category_id"=>"46", "picture_1"=>#<ActionDispatch::Http::UploadedFile:0x007fdea5c33c88 @tempfile=#<Tempfile:/tmp/RackMultipart20150621-3-1pvqgj7.jpg>, @original_filename="image.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name="item[picture_1]"; filename="image.jpg"rnContent-Type: image/jpegrn">, "picture_1_cache"=>"", "picture_2_cache"=>"", "picture_3_cache"=>"", "picture_4_cache"=>"", "title"=>"66666666666", "content"=>"っっっっっっっっっっっg", "condition_id"=>"1", "delivery"=>"false", "area"=>"1", "limit_day"=>"2015-06-27 13:58"}, "commit"=>"出品する"}
2015-06-21T04:58:57.558263+00:00 app[web.1]:  User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2015-06-21T04:58:58.593921+00:00 app[web.1]:   (0.7ms) BEGIN
2015-06-21T04:58:58.608082+00:00 app[web.1]:  SQL (1.6ms) INSERT INTO "warrants" ("holder_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["holder_id", 1], ["item_id", 11], ["created_at", "2015-06-21 04:58:58.604974"], ["updated_at", "2015-06-21 04:58:58.604974"]]
2015-06-21T04:58:58.603937+00:00 app[web.1]:  SQL (0.9ms) INSERT INTO "items" ("title", "condition_id", "content", "area", "limit_day", "delivery", "category_id", "sub_category_id", "picture_1", "user_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["title", "66666666666"], ["condition_id", 1], ["content", "っっっっっっっっっっっg"], ["area", 1], ["limit_day", "2015-06-27 04:58:00.000000"], ["delivery", "f"], ["category_id", 4], ["sub_category_id", 46], ["picture_1", "image.jpg"], ["user_id", 1], ["created_at", "2015-06-21 04:58:58.597097"], ["updated_at", "2015-06-21 04:58:58.597097"]]
2015-06-21T04:59:01.528032+00:00 heroku[router]: at=info method=POST path="/items" host=ponta.herokuapp.com request_id=d8599bc7-e1fb-4aeb-a9f2-9cb6a151db14 fwd="221.133.90.90" dyno=web.1 connect=2ms service=5249ms status=302 bytes=1339
2015-06-21T04:59:01.513588+00:00 app[web.1]:   (1.4ms) COMMIT
2015-06-21T04:59:01.518359+00:00 app[web.1]: Redirected to https://ponta.herokuapp.com/items/continue
2015-06-21T04:59:01.516213+00:00 app[web.1]:  User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 LIMIT 1 [["id", 1]]
2015-06-21T04:59:01.519916+00:00 app[web.1]: Completed 302 Found in 3965ms (ActiveRecord: 6.6ms)
2015-06-21T04:59:01.884980+00:00 app[web.1]: Started GET "/items/continue" for 221.133.90.90 at 2015-06-21 04:59:01 +0000
2015-06-21T04:59:01.894359+00:00 app[web.1]:  User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2015-06-21T04:59:01.902755+00:00 app[web.1]:  Rendered items/continue.html.erb within layouts/application (1.4ms)
2015-06-21T04:59:01.917097+00:00 app[web.1]:  Notification Load (0.7ms) SELECT "notifications".* FROM "notifications" WHERE "notifications"."recipient_id" = 1 AND "notifications"."status" = 'f'
2015-06-21T04:59:01.928591+00:00 app[web.1]:  Profile Load (0.6ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."user_id" = $1 LIMIT 1 [["user_id", 1]]
2015-06-21T04:59:01.933674+00:00 app[web.1]: Completed 200 OK in 44ms (Views: 29.8ms | ActiveRecord: 5.3ms)
2015-06-21T04:59:01.889764+00:00 app[web.1]: Processing by ItemsController#continue as HTML
2015-06-21T04:59:01.899011+00:00 app[web.1]:  Category Load (0.9ms) SELECT "categories".* FROM "categories" WHERE "categories"."name" = $1 LIMIT 1 [["name", "root"]]
2015-06-21T04:59:01.913214+00:00 app[web.1]:  Todo Load (1.6ms) SELECT "todos".* FROM "todos" WHERE ((exhibitor_id = 1 AND status = 'f') OR (proprietor_id = 1 AND status = 'f'))
2015-06-21T04:59:01.921099+00:00 app[web.1]:  Category Load (0.7ms) SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" = $1 [["parent_id", 1]]
2015-06-21T04:59:01.933021+00:00 app[web.1]:  Rendered ideas/_form.html.erb (2.1ms)
2015-06-21T04:59:01.944598+00:00 heroku[router]: at=info method=GET path="/items/continue" host=ponta.herokuapp.com request_id=5bf129f9-f189-4bca-a3b4-9e8472783cb4 fwd="221.133.90.90" dyno=web.1 connect=1ms service=66ms status=200 bytes=13488
2015-06-21T04:59:02.603671+00:00 heroku[router]: at=info method=GET path="/assets/opps.jpg" host=ponta.herokuapp.com request_id=9a5516b9-9af0-4988-b3da-3b5e260643d8 fwd="221.133.90.90" dyno=web.1 connect=9ms service=19ms status=304 bytes=343
2015-06-21T04:59:02.589854+00:00 app[web.1]: Started GET "/assets/opps.jpg" for 221.133.90.90 at 2015-06-21 04:59:02 +0000
2015-06-21T04:59:03.437611+00:00 app[web.1]: Started GET "/assets/lato/lato-regular.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.447752+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-regular.woff" host=ponta.herokuapp.com request_id=b99c9f00-22e5-40f7-a197-f4beefcf32e5 fwd="221.133.90.90" dyno=web.1 connect=2ms service=11ms status=304 bytes=343
2015-06-21T04:59:03.900702+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-light.woff" host=ponta.herokuapp.com request_id=3085f989-4737-4631-a8a6-978283a762ef fwd="221.133.90.90" dyno=web.1 connect=9ms service=15ms status=304 bytes=343
2015-06-21T04:59:03.898327+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-bold.woff" host=ponta.herokuapp.com request_id=83fb3a02-f42b-4b64-a03e-ed71e93d551b fwd="221.133.90.90" dyno=web.1 connect=2ms service=6ms status=304 bytes=343
2015-06-21T04:59:03.909771+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-black.woff" host=ponta.herokuapp.com request_id=f3a1b687-ba75-4ff3-a48c-f16be0bab00e fwd="221.133.90.90" dyno=web.1 connect=2ms service=7ms status=304 bytes=343
2015-06-21T04:59:03.885385+00:00 app[web.1]: Started GET "/assets/lato/lato-light.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.903886+00:00 app[web.1]: Started GET "/assets/lato/lato-black.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.892069+00:00 app[web.1]: Started GET "/assets/lato/lato-bold.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.915291+00:00 app[web.1]: Started GET "/assets/glyphicons/flat-ui-icons-regular.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.922423+00:00 heroku[router]: at=info method=GET path="/assets/glyphicons/flat-ui-icons-regular.woff" host=ponta.herokuapp.com request_id=bc4e264a-79e8-45a5-8031-7ec6f48c42f5 fwd="221.133.90.90" dyno=web.1 connect=1ms service=6ms status=304 bytes=343
```
  • Ruby on Rails

    9310 questions

    Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

1 つい

退会済みユーザー

退会済みユーザー

2015/06/21 14:15  投稿

Rails4.2 iPhoneのsafariから更新すると全てのアイテムが更新されてしまう
herokuにアプリをアップしました。
macbookからテストした時は問題なかったのですが、iPhoneのsafariでのテストで下記の問題が起きました。
Item modelでitemをcreateするとユーザが過去にcreateした全てのアイテムの画像(picture_1)が更新され、新規でcreateしたものに差し代わってしまう。
原因が全くわかりません
```lang-<ruby>
def create
   @item = current_user.items.build(item_params)
   respond_to do |format|
     if @item.save
       format.html { redirect_to items_continue_url, notice: 'アイテムを登録しました' }
       format.json { render :show, status: :created, location: @item }
     else
       format.html { render :new }
       format.json { render json: @item.errors, status: :unprocessable_entity }
     end
   end
 end
```
```lang-<ruby>
2015-06-21T04:57:50.122039+00:00 app[web.1]: Started GET "/categories/4/sub_categories" for 221.133.90.90 at 2015-06-21 04:57:50 +0000
2015-06-21T04:58:57.552332+00:00 app[web.1]: Started POST "/items" for 221.133.90.90 at 2015-06-21 04:58:57 +0000
2015-06-21T04:58:57.560891+00:00 app[web.1]:  Category Load (0.5ms) SELECT "categories".* FROM "categories" WHERE "categories"."name" = $1 LIMIT 1 [["name", "root"]]
2015-06-21T04:58:57.554902+00:00 app[web.1]: Processing by ItemsController#create as HTML
2015-06-21T04:58:57.555006+00:00 app[web.1]:  Parameters: {"utf8"=>"✓", "authenticity_token"=>"GlkuJs8kRutr7DkJNTIXZGltATv16Z7SlduPQUcu81EEhFQzRqRss7/6sJ2Py4F/bOFRy77kDSZhI6T8gGSfUQ==", "item"=>{"category_id"=>"4", "sub_category_id"=>"46", "picture_1"=>#<ActionDispatch::Http::UploadedFile:0x007fdea5c33c88 @tempfile=#<Tempfile:/tmp/RackMultipart20150621-3-1pvqgj7.jpg>, @original_filename="image.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name="item[picture_1]"; filename="image.jpg"rnContent-Type: image/jpegrn">, "picture_1_cache"=>"", "picture_2_cache"=>"", "picture_3_cache"=>"", "picture_4_cache"=>"", "title"=>"66666666666", "content"=>"っっっっっっっっっっっg", "condition_id"=>"1", "delivery"=>"false", "area"=>"1", "limit_day"=>"2015-06-27 13:58"}, "commit"=>"出品する"}
2015-06-21T04:58:57.558263+00:00 app[web.1]:  User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2015-06-21T04:58:58.593921+00:00 app[web.1]:   (0.7ms) BEGIN
2015-06-21T04:58:58.608082+00:00 app[web.1]:  SQL (1.6ms) INSERT INTO "warrants" ("holder_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["holder_id", 1], ["item_id", 11], ["created_at", "2015-06-21 04:58:58.604974"], ["updated_at", "2015-06-21 04:58:58.604974"]]
2015-06-21T04:58:58.603937+00:00 app[web.1]:  SQL (0.9ms) INSERT INTO "items" ("title", "condition_id", "content", "area", "limit_day", "delivery", "category_id", "sub_category_id", "picture_1", "user_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" [["title", "66666666666"], ["condition_id", 1], ["content", "っっっっっっっっっっっg"], ["area", 1], ["limit_day", "2015-06-27 04:58:00.000000"], ["delivery", "f"], ["category_id", 4], ["sub_category_id", 46], ["picture_1", "image.jpg"], ["user_id", 1], ["created_at", "2015-06-21 04:58:58.597097"], ["updated_at", "2015-06-21 04:58:58.597097"]]
2015-06-21T04:59:01.528032+00:00 heroku[router]: at=info method=POST path="/items" host=ponta.herokuapp.com request_id=d8599bc7-e1fb-4aeb-a9f2-9cb6a151db14 fwd="221.133.90.90" dyno=web.1 connect=2ms service=5249ms status=302 bytes=1339
2015-06-21T04:59:01.513588+00:00 app[web.1]:   (1.4ms) COMMIT
2015-06-21T04:59:01.518359+00:00 app[web.1]: Redirected to https://ponta.herokuapp.com/items/continue
2015-06-21T04:59:01.516213+00:00 app[web.1]:  User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 LIMIT 1 [["id", 1]]
2015-06-21T04:59:01.519916+00:00 app[web.1]: Completed 302 Found in 3965ms (ActiveRecord: 6.6ms)
2015-06-21T04:59:01.884980+00:00 app[web.1]: Started GET "/items/continue" for 221.133.90.90 at 2015-06-21 04:59:01 +0000
2015-06-21T04:59:01.894359+00:00 app[web.1]:  User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL AND "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2015-06-21T04:59:01.902755+00:00 app[web.1]:  Rendered items/continue.html.erb within layouts/application (1.4ms)
2015-06-21T04:59:01.917097+00:00 app[web.1]:  Notification Load (0.7ms) SELECT "notifications".* FROM "notifications" WHERE "notifications"."recipient_id" = 1 AND "notifications"."status" = 'f'
2015-06-21T04:59:01.928591+00:00 app[web.1]:  Profile Load (0.6ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."user_id" = $1 LIMIT 1 [["user_id", 1]]
2015-06-21T04:59:01.933674+00:00 app[web.1]: Completed 200 OK in 44ms (Views: 29.8ms | ActiveRecord: 5.3ms)
2015-06-21T04:59:01.889764+00:00 app[web.1]: Processing by ItemsController#continue as HTML
2015-06-21T04:59:01.899011+00:00 app[web.1]:  Category Load (0.9ms) SELECT "categories".* FROM "categories" WHERE "categories"."name" = $1 LIMIT 1 [["name", "root"]]
2015-06-21T04:59:01.913214+00:00 app[web.1]:  Todo Load (1.6ms) SELECT "todos".* FROM "todos" WHERE ((exhibitor_id = 1 AND status = 'f') OR (proprietor_id = 1 AND status = 'f'))
2015-06-21T04:59:01.921099+00:00 app[web.1]:  Category Load (0.7ms) SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" = $1 [["parent_id", 1]]
2015-06-21T04:59:01.933021+00:00 app[web.1]:  Rendered ideas/_form.html.erb (2.1ms)
2015-06-21T04:59:01.944598+00:00 heroku[router]: at=info method=GET path="/items/continue" host=ponta.herokuapp.com request_id=5bf129f9-f189-4bca-a3b4-9e8472783cb4 fwd="221.133.90.90" dyno=web.1 connect=1ms service=66ms status=200 bytes=13488
2015-06-21T04:59:02.603671+00:00 heroku[router]: at=info method=GET path="/assets/opps.jpg" host=ponta.herokuapp.com request_id=9a5516b9-9af0-4988-b3da-3b5e260643d8 fwd="221.133.90.90" dyno=web.1 connect=9ms service=19ms status=304 bytes=343
2015-06-21T04:59:02.589854+00:00 app[web.1]: Started GET "/assets/opps.jpg" for 221.133.90.90 at 2015-06-21 04:59:02 +0000
2015-06-21T04:59:03.437611+00:00 app[web.1]: Started GET "/assets/lato/lato-regular.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.447752+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-regular.woff" host=ponta.herokuapp.com request_id=b99c9f00-22e5-40f7-a197-f4beefcf32e5 fwd="221.133.90.90" dyno=web.1 connect=2ms service=11ms status=304 bytes=343
2015-06-21T04:59:03.900702+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-light.woff" host=ponta.herokuapp.com request_id=3085f989-4737-4631-a8a6-978283a762ef fwd="221.133.90.90" dyno=web.1 connect=9ms service=15ms status=304 bytes=343
2015-06-21T04:59:03.898327+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-bold.woff" host=ponta.herokuapp.com request_id=83fb3a02-f42b-4b64-a03e-ed71e93d551b fwd="221.133.90.90" dyno=web.1 connect=2ms service=6ms status=304 bytes=343
2015-06-21T04:59:03.909771+00:00 heroku[router]: at=info method=GET path="/assets/lato/lato-black.woff" host=ponta.herokuapp.com request_id=f3a1b687-ba75-4ff3-a48c-f16be0bab00e fwd="221.133.90.90" dyno=web.1 connect=2ms service=7ms status=304 bytes=343
2015-06-21T04:59:03.885385+00:00 app[web.1]: Started GET "/assets/lato/lato-light.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.903886+00:00 app[web.1]: Started GET "/assets/lato/lato-black.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.892069+00:00 app[web.1]: Started GET "/assets/lato/lato-bold.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.915291+00:00 app[web.1]: Started GET "/assets/glyphicons/flat-ui-icons-regular.woff" for 221.133.90.90 at 2015-06-21 04:59:03 +0000
2015-06-21T04:59:03.922423+00:00 heroku[router]: at=info method=GET path="/assets/glyphicons/flat-ui-icons-regular.woff" host=ponta.herokuapp.com request_id=bc4e264a-79e8-45a5-8031-7ec6f48c42f5 fwd="221.133.90.90" dyno=web.1 connect=1ms service=6ms status=304 bytes=343
```
  • Ruby on Rails

    9310 questions

    Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

思考するエンジニアのためのQ&Aサイト「teratail」について詳しく知る