Skip to content

Commit

Permalink
Add has many filters through preference source media in user model
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliza Dunaway committed Jan 7, 2016
1 parent 01103f7 commit 6319774
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class User < ActiveRecord::Base
has_many: :preferences
has_many: :filters, :through :preference, source: 'media'

validates :username, :password, :email, :active, presence: true
validates_uniqueness_of :username, :email
Expand Down

1 comment on commit 6319774

@Bigless27
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Please sign in to comment.