Skip to content

Commit

Permalink
Merge pull request #240 from ifad/chore/fix-parallel-assignment-offenses
Browse files Browse the repository at this point in the history
Fix Style/ParallelAssignment offenses
  • Loading branch information
tagliala authored Oct 19, 2023
2 parents 99aa220 + 21e1571 commit 02079a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
10 changes: 2 additions & 8 deletions .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/chrono_model/adapter/ddl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def chrono_public_view_ddl(table, options = nil)
columns = self.columns(table).map { |c| quote_column_name(c.name) }
columns.delete(quote_column_name(pk))

fields, values = columns.join(', '), columns.map { |c| "NEW.#{c}" }.join(', ')
fields = columns.join(', ')
values = columns.map { |c| "NEW.#{c}" }.join(', ')

chrono_create_INSERT_trigger(table, pk, current, history, fields, values)
chrono_create_UPDATE_trigger(table, pk, current, history, fields, values, options, columns)
Expand Down
3 changes: 2 additions & 1 deletion lib/chrono_model/time_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ def last_changes
#
def changes_against(ref)
self.class.attribute_names_for_history_changes.inject({}) do |changes, attr|
old, new = ref.public_send(attr), public_send(attr)
old = ref.public_send(attr)
new = public_send(attr)

changes.tap do |c|
changed =
Expand Down

0 comments on commit 02079a6

Please sign in to comment.