Skip to content

Commit

Permalink
Artwork ids are strings, not integers
Browse files Browse the repository at this point in the history
  • Loading branch information
jonallured committed Apr 27, 2017
1 parent 54bdd2f commit 69ee68e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/batch_updates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def batch_update_params
batch_update = params.fetch(:batch_update, {})

genes = JSON.parse batch_update[:genes]
artworks = batch_update[:artworks].map(&:to_i)
artworks = batch_update[:artworks]

{
artworks: artworks,
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170421185506_create_batch_updates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CreateBatchUpdates < ActiveRecord::Migration[5.0]
def change
create_table :batch_updates do |t|
t.json :genes
t.integer :artworks, array: true
t.string :artworks, array: true
t.integer :user_id
t.timestamps
end
Expand Down

0 comments on commit 69ee68e

Please sign in to comment.