Skip to content

Rubocop fixes #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/active_model_persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

require 'active_support'
require 'active_model'

# rubocop:disable Lint/RedundantRequireStatement
require 'pp'
# rubocop:enable Lint/RedundantRequireStatement

# A set of mixins to add to ActiveModel classes to support persistence
#
Expand Down
2 changes: 1 addition & 1 deletion lib/active_model_persistence/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def destroy_all
#
def delete_all
@object_array = []
indexes.values.each(&:remove_all)
indexes.each_value(&:remove_all)
nil
end

Expand Down
2 changes: 1 addition & 1 deletion spec/active_model_persistence/persistence_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def self.name
expect(object.persisted?).to eq(false)
end

it 'should not add the object to the object store' do\
it 'should not add the object to the object store' do
expect { object.save! }.to raise_error(ActiveModelPersistence::ObjectNotValidError)
expect(model_class.all.size).to be_zero
end
Expand Down