Skip to content

Commit

Permalink
Merge pull request #98 from Wefunder/master
Browse files Browse the repository at this point in the history
Update Postgres Adapter to work with updated Rails 7.2 API
  • Loading branch information
JoeSouthan authored Aug 21, 2024
2 parents b719d49 + 02133bb commit c49e0e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/active_record/safer_migrations/postgresql_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ def get_setting(setting_name)
end

def fill_sql_values(sql, values)
ActiveRecord::Base.send(:replace_named_bind_variables, sql, values)
if Rails.version >= '7.2.0'
ActiveRecord::Base.send(:replace_named_bind_variables, self, sql, values)
else
ActiveRecord::Base.send(:replace_named_bind_variables, sql, values)
end
end
end
end
Expand Down

0 comments on commit c49e0e1

Please sign in to comment.