Quantcast
Channel: Inline styling in Rails 4 erb - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Inline styling in Rails 4 erb

$
0
0

So I am stuck with a small issue while migrating a legacy project from Rails 3.2 to 4.2Inside one of our views (erb), the code (Rails 3.2)

html_safe(truncate(job_profile.description +'&nbsp;&nbsp;<font color="#999">[ '+ list.join(', ') +' ]</font>', :length => 100))

produces the following text:

Rails_3_version

if it's not clear job_profile.description resolves to Test and likewise list.join(', ') to English Listening ComprehensionNow the same code in Rails 4.2 produces the following:

Rails_4_version

Tried many options to reproduce the original result but didn't succeed. Suggestions ?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images