Hi all, TestController
def show @object = Object.find(params[:id]) end I have show.html.erb which has the foll js in the head <script type='text/javascript'> $(document).ready(function($) { $("#divcontainer").load("first.html.erb"); var refreshId1 = setInterval(function() {$("#divcontainer").load ('first.html.erb');}, 120000); }) </script> This basically dynamically loads the first.html file after the set interval... The first.html.erb is as follows script type='text/javascript'> $(document).ready(function($) { //how to access @object.attribute? }) </script> <div class='test'></div> 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
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.