Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

python_sandbox's Profile

GitHub User: poc7667

Comments by python_sandbox

Avatar

http://stackoverflow.com/questions/23212898/tokeninput-not-load-the-existing-data-unless-reloading-page

I followed the railscast tutorial , but I found I can not load the "saved tokens".

I think the problem is that when click 'edit' link (created by scaffold),

it didn't trigger the preload function, how do you fix the problems in Rails 4

enter image description here

View page

  .form-inputs
    = f.input :name
    = f.input :content
    = f.text_field :user_tokens, data: {load: @article.users}

My coffeescript

$(document).ready -> 
  $('#article_user_tokens').tokenInput '/users.json',
    theme: 'facebook',
    prePopulate: $('#article_user_tokens').data('load')

Require the css and js file

 *= require token-input-facebook
 //= require jquery.tokeninput
Avatar

I see render @incompletetasks, but I didn't see the _incomplete_task.html.erb ? I'm using Rails 3.2.13 and give me missing template error==