Im need render this remplate with Rails.root
<%= escape_javascript(render(:template => '#{Rails.root}/app/controllers/posts/repost_new'))%>
but I get the error:
ActionView::Template::Error (Missing template #{Rails.root}...more
I have the file repost_new.html.erb in views posts directory…
I have repost_new method in posts_controller.rb
What is the problem :S.
Please use double quotes instead of single ones. Single quoted strings are not interpolated in Ruby.