Skip to content

Commit

Permalink
Pass coder as a keyword argument
Browse files Browse the repository at this point in the history
  • Loading branch information
coorasse committed Aug 12, 2024
1 parent abf7077 commit b2e56be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.8.1
* Fix Rails 7.1 warnings.

# 0.8.0
* Add option skip_body to skip the body for request responses. Use this option when you don't want to persist the response body. `[Skipped]` will be persisted instead. This is not a breaking change.

Expand Down
4 changes: 2 additions & 2 deletions lib/rails_api_logger/request_log.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class RequestLog < ActiveRecord::Base
self.abstract_class = true

serialize :request_body, JSON
serialize :response_body, JSON
serialize :request_body, coder: JSON
serialize :response_body, coder: JSON

belongs_to :loggable, optional: true, polymorphic: true

Expand Down
2 changes: 1 addition & 1 deletion rails_api_logger.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = "rails_api_logger"
spec.version = "0.8.0"
spec.version = "0.8.1"
spec.authors = ["Alessandro Rodi"]
spec.email = ["[email protected]"]

Expand Down

0 comments on commit b2e56be

Please sign in to comment.