2008年12月18日 星期四

header, redirect_to , render js, polymorphic_path

6.4. Other Action Controller Changes

HTTP Accept header 現在default 是 disable 啦, 想要打開要自己開
不然就是自己在生時後面要有type啦 像 url /customers/1.xml



redirect_to now fully supports URI schemes (so, for example, you can redirect to a svn+ssh: URI).



有js 參數可以用不用在自己設response.headers['Content-Type']='text/javascript'
render now supports a :js option to render plain vanilla javascript with the right mime type.



Polymorphic URLs behave more sensibly if a passed parameter is nil. For example, calling polymorphic_path([@project, @date, @area]) with a nil date will give you project_area_path

沒有留言: