Skip to content

Commit

Permalink
add BadgeClaim model
Browse files Browse the repository at this point in the history
  • Loading branch information
ahwagner committed Dec 2, 2016
1 parent 4b4212d commit 068f0ba
Show file tree
Hide file tree
Showing 5 changed files with 232 additions and 214 deletions.
4 changes: 4 additions & 0 deletions app/models/badge_claim.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class BadgeClaim < ActiveRecord::Base
belongs_to :user
belongs_to :badge
end
10 changes: 10 additions & 0 deletions db/migrate/20161202121109_create_badge_claims.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class CreateBadgeClaims < ActiveRecord::Migration
def change
create_table :badge_claims do |t|
t.references :user, index: true, foreign_key: true
t.references :badge, index: true, foreign_key: true

t.timestamps null: false
end
end
end
Loading

0 comments on commit 068f0ba

Please sign in to comment.