Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove .html.haml from render directive #728

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/trusty_cms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

unless defined? TrustyCms::VERSION
module TrustyCms
VERSION = '6.0.2'.freeze
VERSION = '6.0.3'.freeze
end
end

4 changes: 2 additions & 2 deletions lib/trusty_cms/task_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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' }
Expand Down
Loading