Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio-e committed Jul 24, 2024
1 parent 0460612 commit fc8767f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .database_consistency.todo.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
---
Profile:
self_ref:
MissingIndexChecker:
enabled: false
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-capybara
- rubocop-performance
Expand Down
14 changes: 14 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-07-24 21:43:58 UTC using RuboCop version 1.64.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent:
Exclude:
- 'app/models/profile.rb'
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -585,4 +585,4 @@ RUBY VERSION
ruby 3.3.3p89

BUNDLED WITH
2.5.14
2.5.16
1 change: 1 addition & 0 deletions app/models/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
class Profile < ApplicationRecord
has_one_attached :image

has_one :self_ref, class_name: "Profile", foreign_key: :id, inverse_of: :self_ref
has_one :user, through: :self_ref, source: :profileable, source_type: "User"
has_one :speaker, through: :self_ref, source: :profileable, source_type: "Speaker"

Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/registrations_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
it "creates a new User" do
expect { post :create, params: params }.to change(User, :count).by(1)
expect(session[:user_id]).to eq(User.last.id)
expect(response).to redirect_to(root_path)
expect(response).to redirect_to(edit_profile_path)
end
end

Expand Down

0 comments on commit fc8767f

Please sign in to comment.