Utilizzo Rails 4 e ho riscontrato un problema molto strano. Quello crudo e troncato non funziona correttamente insieme.Rails Truncate e raw non funzionano insieme
<%= raw(job.description)%> # working properly
<%= raw(truncate(job.description,:length => 200))%> # Not strip html tags
<%= truncate((raw job.description),:length => 200)%> # Not strip html tags
Qual è il problema?
Qualsiasi aiuto per favore ??
Doesn aiutami, forse perché sto usando haml ... (raw idea.description.truncate (100)) lo ha reso – yozzz
@yozzz - Solo il tuo commento '(raw idea.description.truncate (100))' ha funzionato anche per me. Forse dovresti farlo in una risposta e segnare come corretto? – rorykoehler