Skip to content

Commit 588fbac

Browse files
committed
feat(invoice): include picture_data and image uploader
1 parent 21dd5da commit 588fbac

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

spec/dummy/app/models/invoice.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class Invoice < ActiveRecord::Base
66
extend ::Enumerize
77
include Paperclip::Glue
88
include AASM
9+
include ImageUploader::Attachment(:picture)
910

1011
belongs_to :category
1112
belongs_to :city
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddPictureDataToInvoice < ActiveRecord::Migration[5.2]
2+
def change
3+
add_column :invoices, :picture_data, :text
4+
end
5+
end

spec/dummy/db/schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 2018_02_28_122115) do
13+
ActiveRecord::Schema.define(version: 2022_04_01_181023) do
1414

1515
create_table "active_admin_comments", force: :cascade do |t|
1616
t.string "namespace"
@@ -93,6 +93,7 @@
9393
t.string "aasm_state"
9494
t.boolean "active", default: true
9595
t.string "shipping_status"
96+
t.text "picture_data"
9697
t.index ["category_id"], name: "index_invoices_on_category_id"
9798
t.index ["city_id"], name: "index_invoices_on_city_id"
9899
end

0 commit comments

Comments
 (0)