From a6f39c00c243a3b788043abb9fa11e1cc2a2f6d3 Mon Sep 17 00:00:00 2001 From: danigirl329 Date: Fri, 27 Oct 2023 12:32:49 -0400 Subject: [PATCH] Remove .html.haml from render directive Update version to 6.0.3 --- Gemfile.lock | 2 +- app/controllers/admin/pages_controller.rb | 2 +- lib/trusty_cms.rb | 2 +- lib/trusty_cms/task_support.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index bb2476008..9c419ebc7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - trusty-cms (6.0.2) + trusty-cms (6.0.3) RedCloth (= 4.3.2) activestorage-validator acts_as_list (>= 0.9.5, < 1.2.0) diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index b5dd4d258..f7a33a2c1 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -17,7 +17,7 @@ def message @template_name = 'index' self.models = Page.find(params[:page_id]).children.all response.headers['Content-Type'] = 'text/html;charset=utf-8' - render action: 'children.html.haml', layout: false + render action: 'children', layout: false end end diff --git a/lib/trusty_cms.rb b/lib/trusty_cms.rb index 2b160b9f4..d8cadcfd0 100644 --- a/lib/trusty_cms.rb +++ b/lib/trusty_cms.rb @@ -2,7 +2,7 @@ unless defined? TrustyCms::VERSION module TrustyCms - VERSION = '6.0.2'.freeze + VERSION = '6.0.3'.freeze end end diff --git a/lib/trusty_cms/task_support.rb b/lib/trusty_cms/task_support.rb index 26d0e2ce9..a86bc7147 100644 --- a/lib/trusty_cms/task_support.rb +++ b/lib/trusty_cms/task_support.rb @@ -44,7 +44,7 @@ def config_import(path = "#{Rails.root}/config/trusty_config.yml", clear = nil) def cache_files(dir, files, cache_file) cache_content = files.collect do |f| File.read(File.join(dir, f)) - end .join("\n\n") + end.join("\n\n") cache_path = File.join(dir, cache_file) File.delete(cache_path) if File.exists?(cache_path) @@ -54,7 +54,7 @@ def cache_files(dir, files, cache_file) # Reads through the layout file and returns an array of JS filenames # def find_admin_js - layout = "#{TRUSTY_CMS_ROOT}/app/views/layouts/application.html.haml" + layout = "#{TRUSTY_CMS_ROOT}/app/views/layouts/application" js_regexp = /javascript_include_tag %w\((.*)\), :cache => 'admin\/all/ files = File.open(layout) { |f| f.read.match(js_regexp)[1].split } files.collect { |f| f.split('/').last + '.js' }