interval...
Can anyone pls guide me how to access @object.attribute in
first.html.erb's js to load the html in the container.
Pls help
If you’re trying to access server-side Ruby objects within the
client-side
Javascript, then this is possible by
making an Ajax call to the server and returning the result as JSON or
some
other formatted data.
If you’re trying to access server-side Ruby objects within the HTML,
then
you can simply do the following:
<%= @object.attribute %>
Good luck,
-Conrad
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.