lifeform 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f1e91a0e3977e9c1ee9bf2fadc00d427efa8f7fcf720ba0670905832e89e41c
4
- data.tar.gz: 458c2edd232353260115c6eb794ebfcc7298696723e3ec5f49518ed8ccb68e19
3
+ metadata.gz: 9dbdb103263edf279b32445d6faa8d4b0cbb6cacf21fe7b8f520af8a5896d0e0
4
+ data.tar.gz: 01fe12ea7c14e7b488ea1a383e7158c8d63adce6346a4c869613419046d5ec58
5
5
  SHA512:
6
- metadata.gz: f8c0c7b398b5375cc50f0fb9d59ad5f759dcd05cd355fba4ed8c24c6c1e3e11c2447d888592f0c2ccb799a596bdfc23902fd822bd397cbf731c2ef77f453effc
7
- data.tar.gz: e96679b59c1abae814f740ba190659eb29a4bae5c1fcc8809bff3336b138b13aded6f87d5bf0a2522ec86de80f8c98c1586eb8fcb81986edd242093294c0d1b0
6
+ metadata.gz: 7272ba2e8224d31ed4b8313bec9056dcef6f82c995119ca43f8381d55aa304eff8119e1055bc7a838a17b61225efdb09200485d79edf30d4c5c616551f52a453
7
+ data.tar.gz: 788fe1a1ec8ea8d70d10b7e90f3993443a2f71040dc68e547095c07c3688d9afd41b16afe1c33456a63dffe8273a2fc2f833c87201b10553c1d5cede1d8b5842
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lifeform (0.4.0)
4
+ lifeform (0.4.1)
5
5
  activesupport (>= 6.0)
6
6
  papercraft (~> 0.24)
7
7
  zeitwerk (~> 2.5)
data/lib/lifeform/form.rb CHANGED
@@ -6,7 +6,7 @@ module Lifeform
6
6
  FieldDefinition = Struct.new(:type, :library, :parameters)
7
7
 
8
8
  # A form object which stores field definitions and can be rendered as a component
9
- class Form
9
+ class Form # rubocop:todo Metrics/ClassLength
10
10
  MODEL_PATH_HELPER = :polymorphic_path
11
11
 
12
12
  class << self
@@ -134,7 +134,9 @@ module Lifeform
134
134
  content = if block
135
135
  view_context.capture(self, &block)
136
136
  else
137
- self.class.fields.map { |k, _v| field(k).render_in(self) }.join
137
+ self.class.fields.map { |k, _v| field(k).render_in(self) }.join.then do |renderings|
138
+ renderings.respond_to?(:html_safe) ? renderings.html_safe : renderings
139
+ end
138
140
  end
139
141
 
140
142
  return content unless emit_form_tag
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lifeform
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifeform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team