Skip to content

Commit a116459

Browse files
authored
Merge pull request codebar#1462 from codebar/chore/fix-rubocop-errors-2
Ongoing rubocop work
2 parents d676c13 + 5cbd259 commit a116459

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/models/course.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Course < ActiveRecord::Base
99
belongs_to :sponsor
1010
belongs_to :chapter
1111

12-
belongs_to :tutor, class_name: 'Member', foreign_key: 'tutor_id'
12+
belongs_to :tutor, class_name: 'Member'
1313

1414
before_save :set_slug
1515

app/models/job.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ class Job < ActiveRecord::Base
33

44
enum status: { draft: 0, pending: 1, published: 2 }
55

6-
belongs_to :created_by, class_name: 'Member', foreign_key: :created_by_id
7-
belongs_to :approved_by, class_name: 'Member', foreign_key: :approved_by_id
6+
belongs_to :created_by, class_name: 'Member'
7+
belongs_to :approved_by, class_name: 'Member'
88

99
scope :pending_or_published, -> { where(status: [statuses[:pending], statuses[:published]]) }
1010
scope :ordered, -> { order('created_at desc') }

app/models/meeting.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Meeting < ActiveRecord::Base
99

1010
has_many :organisers, -> { where('permissions.name' => 'organiser') }, through: :permissions, source: :members
1111
belongs_to :venue, class_name: 'Sponsor'
12-
has_many :invitations, foreign_key: 'meeting_id', class_name: 'MeetingInvitation'
12+
has_many :invitations, class_name: 'MeetingInvitation'
1313
has_and_belongs_to_many :chapters
1414

1515
validates :date_and_time, :ends_at, :venue, presence: true

0 commit comments

Comments
 (0)