ruby_cms 0.1.4 → 0.1.6

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: d5cb4cca0c59768b347f78d370c203428f9d663e26fe91a8bc6a7b63c3c14ac7
4
- data.tar.gz: 706b81555013c29de1e4f4641f70f9a63c39d1231811421867f3beaf3f42073e
3
+ metadata.gz: 83d1d3f4aadd9f1f8ad953f3babc9fbb104c2238ba411d0d24bf97bba3574684
4
+ data.tar.gz: 8bef2b9e212a3da28f8af8f387c648c57a5e76a1a50a29b757e49a54b2fe0e62
5
5
  SHA512:
6
- metadata.gz: 7c175d5c394f5f66f5581c417cd6a6029c543319b91ffa55b5410fd62885cf0dfffa22b700594d05a801816f4adcf3df7046222637f46e9ae0f08b8bf81d81cd
7
- data.tar.gz: d24e55dea55ae02cac49473e28a3ed0ac2d3ba7849fd4bc923ca0dab68046af86bf2a3e9f293ffe027f8988ed897c561d0e8043de60e90ac5fadcd8d4c999951
6
+ metadata.gz: 957a2871489bcdc0680f029b43dc7696ec3109bfff994227771c9ff29cf069f529e9d9c99fed37ca1e31eb13acc049dfe2d9c72fb2617f2ac9d755e2928accf0
7
+ data.tar.gz: 800a6f5e760a8d5a5a99e86d5e9d6f9ad2015664c79c2068178f10d5b6c1b59d7d88a5d40230c33577d9d44d950e9a86cfd9f124ebbd166d13a2e06eada03754
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.0.6] - 2026-03-23
4
+
5
+ - Fix visual editor content block bug
6
+
7
+ ## [0.1.5] - 2026-03-23
8
+
9
+ - Fix image bug
10
+
3
11
  ## [0.1.4] - 2026-03-23
4
12
 
5
13
  - Improve visual editor and settings admin UX
Binary file
@@ -135,12 +135,22 @@ module RubyCms
135
135
 
136
136
  def assign_content_block_content(block)
137
137
  if rich_text_content?
138
- block.rich_content = params[:rich_content]
138
+ assign_rich_text_content(block)
139
139
  elsif params[:content].present?
140
140
  block.content = params[:content]
141
141
  end
142
142
  end
143
143
 
144
+ def assign_rich_text_content(block)
145
+ rich_content = params[:rich_content].to_s
146
+
147
+ if block.respond_to?(:rich_content=)
148
+ block.rich_content = rich_content
149
+ else
150
+ block.content = ActionController::Base.helpers.strip_tags(rich_content)
151
+ end
152
+ end
153
+
144
154
  def rich_text_content?
145
155
  params[:content_type] == "rich_text" && params[:rich_content].present?
146
156
  end
@@ -158,7 +168,11 @@ module RubyCms
158
168
  end
159
169
 
160
170
  def content_block_content_text(block)
161
- block.content_type == "rich_text" ? block.rich_content.to_plain_text : block.content
171
+ return block.content unless block.content_type == "rich_text"
172
+ return block.content unless block.respond_to?(:rich_content)
173
+ return block.content unless block.rich_content.respond_to?(:to_plain_text)
174
+
175
+ block.rich_content.to_plain_text
162
176
  end
163
177
 
164
178
  # Return body HTML only (no layout/comments) so preview and Trix get clean HTML.
Binary file
@@ -77,6 +77,8 @@ module RubyCms
77
77
  app.config.assets.paths.unshift(config.root.join("app/javascript")) if app.config.respond_to?(:assets)
78
78
  # Add stylesheets to asset pipeline
79
79
  app.config.assets.paths << config.root.join("app/assets/stylesheets") if app.config.respond_to?(:assets)
80
+ # Images (sidebar logo, etc.) — required for Propshaft/Sprockets `image_tag "ruby_cms/logo.png"`
81
+ app.config.assets.paths << config.root.join("app/assets/images") if app.config.respond_to?(:assets)
80
82
  end
81
83
 
82
84
  initializer "ruby_cms.importmap", before: "importmap" do |app|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCms
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.6"
5
5
  end
data/lib/tasks/admin.rake CHANGED
@@ -118,5 +118,3 @@ namespace :admin do # rubocop:disable Metrics/BlockLength
118
118
  puts "Logged out #{count} session(s)"
119
119
  end
120
120
  end
121
-
122
- # rubocop:enable Metrics/BlockLength
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codebyjob
@@ -73,6 +73,7 @@ files:
73
73
  - CODE_OF_CONDUCT.md
74
74
  - README.md
75
75
  - Rakefile
76
+ - app/assets/images/ruby_cms/logo.png
76
77
  - app/components/ruby_cms/admin/admin_page.rb
77
78
  - app/components/ruby_cms/admin/admin_page/admin_table_content.rb
78
79
  - app/components/ruby_cms/admin/admin_page_header.rb
@@ -185,6 +186,7 @@ files:
185
186
  - db/migrate/20260130000003_add_category_to_ruby_cms_preferences.rb
186
187
  - db/migrate/20260211000001_add_ruby_cms_analytics_fields_to_ahoy_events.rb
187
188
  - db/migrate/20260212000001_use_unprefixed_cms_tables.rb
189
+ - docs/assets/ruby_cms_logo.png
188
190
  - exe/ruby_cms
189
191
  - lib/generators/ruby_cms/install_generator.rb
190
192
  - lib/generators/ruby_cms/templates/admin.html.erb
@@ -200,7 +202,6 @@ files:
200
202
  - lib/ruby_cms/settings_registry.rb
201
203
  - lib/ruby_cms/version.rb
202
204
  - lib/tasks/admin.rake
203
- - log/test.log
204
205
  - sig/ruby_cms.rbs
205
206
  homepage: https://github.com/jobhammer00/ruby_cms
206
207
  licenses: []