Remove rich_title font-size style in show page.
This commit is contained in:
parent
2e5682dade
commit
c24045e420
|
@ -43,8 +43,12 @@ class FaqsController < ApplicationController
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
tags = faq.tags.map{|tag| { "tag" => tag.name } } rescue []
|
tags = faq.tags.map{|tag| { "tag" => tag.name } } rescue []
|
||||||
|
temp_rich_title = Nokogiri::HTML(faq.rich_title).css('body')
|
||||||
|
temp_rich_title.children.each_with_index do |child,i|
|
||||||
|
temp_rich_title.children[i].attribute('style').value = child.attribute('style').value.gsub(/\b(?:font-size\s*?:\s*([^;>]*?)(?=[;">}]))/,'')
|
||||||
|
end
|
||||||
{
|
{
|
||||||
"extras" => {"question" => faq.title,"answer" => faq.answer},
|
"extras" => {"question" => temp_rich_title,"answer" => faq.answer},
|
||||||
"faqs_links" => faqs_links,
|
"faqs_links" => faqs_links,
|
||||||
"faqs_files" => faqs_files,
|
"faqs_files" => faqs_files,
|
||||||
"tags" => tags,
|
"tags" => tags,
|
||||||
|
|
Loading…
Reference in New Issue