Skip to content

Commit de03974

Browse files
committed
Fix using partial! with digging
When digging, we swap the builder instance, then when encountering `partial!` on an instance that does not have it implemented, it errors out. This moves the method to the top level top level props_template. So both instances have it.
1 parent 177e35e commit de03974

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/props_template.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ def set!(key, options = {}, &block)
6464
end
6565
end
6666

67+
def partial!(**options)
68+
@context.render options
69+
end
70+
6771
def found_path!
6872
@found_path.join(".")
6973
end

lib/props_template/base.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ def array!(collection = nil, options = {})
111111
nil
112112
end
113113

114-
def partial!(**options)
115-
@context.render options
116-
end
117-
118114
# json.id item.id
119115
# json.value item.value
120116
#

0 commit comments

Comments
 (0)