editmode 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32d49f4215168d36260f8b3f363c12d7ba6948fd7e9f97e8dae1e1b58ddb7ef8
4
- data.tar.gz: ed1cf4a9c60ae63973ed9e3f98b5c2a7e66eb4b273e1a392509574aa7ae3f86a
3
+ metadata.gz: 7fbb861dabf26cb4d95d4a0b56f2cd791849ffcb305d6e762ad787bb728b40fb
4
+ data.tar.gz: d34a6147915164dadadac1495984b4a964bfe5d145d36c8c7c498fa4522903bd
5
5
  SHA512:
6
- metadata.gz: b2036241a90a7d9eff95d2da0553918d278f37c5336b181bcf62d076bb7a4184f87b8dac5a286026dc88f5beaf46e54db5020f6228877d88b0a72592bd85ee2c
7
- data.tar.gz: 6f0354be4a33de404b01f0b1611a87e95c4916b59f0034356cc647192b99f77b113424c5b463d1542c6e405306c959a4477c93949d92392e382c9f7fa98000f1
6
+ metadata.gz: 5cece1f007bb9224ced9a4bee87c29716d2b5c1457814f6b70dcb6ae3784fd4703960ae87d8d87cb218886e023592e6521bc857ac115eadb0607cd5ff904332b
7
+ data.tar.gz: f3967f25a4989c74f5b58b764b03820b7451d80234594eb12beb73265bd4ce8d6bf3d7d716113face40b691924ff6268b31f056b6595ecb133e52f39479a85f8
@@ -163,7 +163,7 @@ module Editmode
163
163
  # prevent the page from loading.
164
164
  begin
165
165
  field = options[:field].presence || ""
166
- options[:referrer] = request.url
166
+ options[:referrer] = request.present? && request.url || ""
167
167
  chunk_value = Editmode::ChunkValue.new(identifier, options)
168
168
 
169
169
  if field.present? && chunk_value.chunk_type == 'collection_item'
@@ -182,11 +182,12 @@ module Editmode
182
182
  render_chunk_content(identifier, chunk_content, chunk_type, options)
183
183
 
184
184
  rescue => error
185
+ puts error
185
186
  # Show fallback content by default
186
187
  return content_tag("em-span", &block) if block_given?
187
188
  # Otherwise show a span with no content to
188
189
  # maintain layout
189
- content_tag("em-span", "&nbsp".html_safe)
190
+ content_tag("em-span", "&nbsp".html_safe)
190
191
  end
191
192
  end
192
193
  alias_method :chunk, :chunk_display
@@ -5,7 +5,7 @@ module Editmode
5
5
  field, options = parse_arguments(args)
6
6
  begin
7
7
  chunk = Editmode::ChunkValue.new(identifier, options.merge({raw: true}))
8
-
8
+
9
9
  if chunk.chunk_type == 'collection_item'
10
10
  chunk.field(field)
11
11
  else
@@ -13,6 +13,7 @@ module Editmode
13
13
  end
14
14
  rescue => er
15
15
  Rails.logger.info "#{er}: We can't render content for #{identifier}"
16
+ return ""
16
17
  end
17
18
  end
18
19
 
@@ -1,3 +1,3 @@
1
1
  module Editmode
2
- VERSION = "1.3.6"
2
+ VERSION = "1.3.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: editmode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Ennis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-15 00:00:00.000000000 Z
11
+ date: 2021-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,7 +97,7 @@ homepage: https://github.com/tonyennis145/editmode-rails
97
97
  licenses:
98
98
  - MIT
99
99
  metadata: {}
100
- post_install_message:
100
+ post_install_message:
101
101
  rdoc_options: []
102
102
  require_paths:
103
103
  - lib
@@ -112,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.2.4
116
- signing_key:
115
+ rubygems_version: 3.0.3
116
+ signing_key:
117
117
  specification_version: 4
118
118
  summary: Editmode allows you to turn plain text in your rails app into easily inline-editable
119
119
  bits of content that can be managed by anyone with no technical knowledge