Skip to content

Commit

Permalink
clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyceJH committed Jul 11, 2017
1 parent d49508f commit 3a494fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class User < ActiveRecord::Base

attr_reader :password

has_many :notebooks, dependent: :destroy,
has_many :notebooks,
dependent: :destroy,
primary_key: :id,
foreign_key: :author_id,
class_name: :Notebook
Expand All @@ -35,7 +36,8 @@ class User < ActiveRecord::Base
foreign_key: :author_id,
class_name: :Note

has_many :tags, dependent: :destroy,
has_many :tags,
dependent: :destroy,
primary_key: :id,
foreign_key: :author_id,
class_name: :Tag
Expand Down

0 comments on commit 3a494fc

Please sign in to comment.