Skip to content

Commit 5c2cdcb

Browse files
committed
Rubocop fixes
1 parent dc6da92 commit 5c2cdcb

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

app/policies/better_together/event_policy.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@ def permitted_query # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
5555
events_table[:creator_id].eq(agent.id)
5656
)
5757
if agent.valid_event_host_ids.any?
58-
event_ids = event_hosts_table.where(event_hosts_table[:host_id]
59-
event_ids = event_hosts_table
60-
.where(event_hosts_table[:host_id].in(agent.valid_event_host_ids))
61-
.project(:event_id)
58+
event_ids = event_ids
59+
.where(event_hosts_table[:host_id].in(agent.valid_event_host_ids))
60+
.project(:event_id)
6261
query = query.or(
6362
events_table[:id].in(event_ids)
6463
)

spec/models/better_together/event_host_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'rails_helper'
44

55
module BetterTogether
6-
RSpec.describe EventHost, type: :model do
6+
RSpec.describe EventHost do
77
pending "add some examples to (or delete) #{__FILE__}"
88
end
99
end

spec/models/better_together/event_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
require 'rails_helper'
44

55
module BetterTogether
6-
RSpec.describe Event, type: :model do
6+
RSpec.describe Event do
77
subject(:event) { create(:event, starts_at: Time.current) }
88

99
it 'exists' do
1010
expect(described_class).to be # rubocop:todo RSpec/Be
1111
end
1212

13-
it 'will default its host to its creator' do
13+
it 'defaults its host to its creator' do
1414
expect(event.event_hosts.map(&:host)).to include(event.creator)
1515
end
1616

0 commit comments

Comments
 (0)