On Sep 30, 10:18 am, Naif Dalbahi <li...@ruby-forum.com> wrote:
> my index.js.erb has:
> [code]
> page.replace_html 'listing', partial => 'list', :locals => { :articles
> => @articles }
> [/code]
>
> the content of the js.erb template is what is returned in the response!
> why is this happening???
Because the above is not an erb template - or rather it contains no
erb tags (<%= and so on).
I believe the 'correct' name for rjs templates these days is js.rjs.
Fred
>
> 2. the second weird behavior:
> if I change the JS template file from .js.erb to .rjs, rails renders the
> http template file!!! even though it received and AJAX request (as
> evident in firebug),, that's really weird..
>
> Please shed some light on why all of this is happening and how do i get
> it my partial to replace the 'listing' div html.
> --
> Posted viahttp://www.ruby-forum.com/.
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment