How to read erb (rails) variables inside a ractive template?

16 views
Skip to first unread message

Natalio Krasnogor

unread,
Sep 27, 2016, 4:37:09 PM9/27/16
to Ractive.js


Full disclosure: I am new to rails and ractive.


I am trying to use a rails variable (current_user.username) within a ractive template but have been unsuccessful.


Is there a simple way to: a) read the value of a rails variable (in my case associated with an Active Record) within the template part of a ractive component template and b) do so within the same *.html.erb file?


Any help or advice will be welcomed.


Reply all
Reply to author
Forward
0 new messages