Skip to content

Commit

Permalink
Rename Jbuilder Hacks module to ValuesTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
newstler committed Aug 21, 2023
1 parent cd14df2 commit c8c3835
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bullet_train-api/lib/bullet_train/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
require "scaffolding/block_manipulator"
require "scaffolding/transformer"
require "jbuilder/schema"
require "jbuilder/hacks"
require "jbuilder/values_transformer"

module BulletTrain
module Api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

require "jbuilder"

module Hacks
module ValuesTransformer
def _set_value(key, value)
value = value.body if value.is_a?(ActionText::RichText)

super(key, value)
end
end

::Jbuilder.prepend Hacks
::Jbuilder.prepend ValuesTransformer

0 comments on commit c8c3835

Please sign in to comment.