开发者

Is using partials the best way to dynamically change content in RoR?

开发者 https://www.devze.com 2023-01-28 03:10 出处:网络
I have a lot of ajax calls that ask a page to insert partials where a user clicks, loading new content.

I have a lot of ajax calls that ask a page to insert partials where a user clicks, loading new content.

Ie:

var url = '/images/thumbnails/'+ this.main_id;
new Ajax.Updater(this.thumbnail_wrapper, url); 

This loads content into the thumbnails_wrapper div. But I have so many partial urls generated on my site n开发者_JS百科ow. Is this really the best way to do this? I wonder if this is a messy solution somehow.. Thanks, new to RoR.


Yes i think its better way, but the that meters here is that how much batter way you mange the partials, and app should be REST. For proper recommendation need to know your proper scenario.

0

精彩评论

暂无评论...
验证码 换一张
取 消