ruby on rails - coffescript is giving error in my project which before works fine -


i looking video http://railscasts.com/episodes/258-token-fields-revised coffescript code

jquery ->   $('#employee_material_asset_tokens').tokeninput '/assets.json'     theme: 'facebook'     prepopulate: $('#employee_material_asset_tokens').data('load') 

it works fine before gives me error

execjs::programerror @ /employee/reviews error: parse error on line 5: unexpected 'indent'   (in /home/prem/rails/heronhrm/app/assets/javascripts/employee/assets.js.coffee) 

i confuse did not change code works fine before .. reason when change code like

jquery -> $('#employee_material_asset_tokens').tokeninput '/assets.json' theme: 'facebook' prepopulate: $('#employee_material_asset_tokens').data('load') 

then token input works prepopulate , theme doesnot work..

i think you're missing , after '/assets.json'. code should like

$('#employee_material_asset_tokens').tokeninput '/assets.json',   theme: 'facebook'   prepopulate: $('#employee_material_asset_tokens').data('load') 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -