Remove unnecessary foreign_key options
When we specify `belongs_to :author`, ActiveRecord automatically uses `author_id` as the foreign key.
This commit is contained in:
@@ -28,7 +28,7 @@ class Poll < ApplicationRecord
|
||||
has_many :ballot_sheets
|
||||
|
||||
has_and_belongs_to_many :geozones
|
||||
belongs_to :author, -> { with_hidden }, class_name: "User", foreign_key: "author_id"
|
||||
belongs_to :author, -> { with_hidden }, class_name: "User"
|
||||
belongs_to :related, polymorphic: true
|
||||
belongs_to :budget
|
||||
|
||||
|
||||
Reference in New Issue
Block a user