Rails bootstrap-editable-rails not displaying current text -
i'm trying use gem 'bootstrap-editable-rails' in-line edit text column. want display current text in column. but, right displays "empty" instead. if click on , enter new text, replaces column value in database - updating working.
the table called "taskup". text column called "comments".
this code in view file:
<a href="#" class="answer" data-type="text" data-pk="1" data-resource="taskup" data-name="comments" data-url="/taskups/<%= taskup.id %>" ></a>
and coffee script:
$(".answer").editable()
thanks help!
almost! you're missing set value inside tag
<a href="#" class="answer" data-type="text" data-pk="1" data-resource="taskup" data-name="comments" data-url="/taskups/<%= taskup.id %>" > <%= taskup.comments ? taskup.comments : ''> </a>
hope helps.
Comments
Post a Comment