Skip to content

Commit

Permalink
Same fix
Browse files Browse the repository at this point in the history
  • Loading branch information
penguoir committed Feb 15, 2024
1 parent bff72df commit 11d82e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/active_cortex/generator/boolean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def self.accepts?(record:, field_name:)
record.class.attribute_types[field_name.to_s].type == :boolean
end

def save_generation(record:, field_name:)
def save_generation
record.send("#{field_name}=", generation)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/active_cortex/generator/boolean_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

context "when saving the generation" do
it "saves the generation to the record", :vcr do
generator.save_generation(record: book, field_name: :completed)
generator.save_generation
expect(book.completed).to be_a(TrueClass).or be_a(FalseClass)
end
end
Expand Down

0 comments on commit 11d82e0

Please sign in to comment.