Bike photo upload

This commit is contained in:
Ilya Konanykhin
2017-01-18 18:38:29 +06:00
parent a68e7eca56
commit 5f7eb43f63
10 changed files with 1406 additions and 105 deletions
@@ -0,0 +1,11 @@
class AddAttachmentPhotoToBikes < ActiveRecord::Migration
def self.up
change_table :bikes do |t|
t.attachment :photo
end
end
def self.down
remove_attachment :bikes, :photo
end
end
+5 -1
View File
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20170118110330) do
ActiveRecord::Schema.define(:version => 20170118112258) do
create_table "bike_actions", :force => true do |t|
t.string "action", :limit => 128, :null => false
@@ -73,6 +73,10 @@ ActiveRecord::Schema.define(:version => 20170118110330) do
t.string "model"
t.integer "shop_id"
t.integer "bike_wheel_size_id"
t.string "photo_file_name"
t.string "photo_content_type"
t.integer "photo_file_size"
t.datetime "photo_updated_at"
end
create_table "credit_conversions", :force => true do |t|