开发者

What is "Different Representations of Resources" in REST stand for?

Is that just means different file type?

I'm trying do this in ROR:

formatted_book_structures_url(book,"choose_list")

I suppose to deal with:

respond_to do |format|
    format.html开发者_StackOverflow中文版 # index.html.erb
    format.xml  { render :xml => @structures }
    format.choose_list { render :partial => "choose_list" }
end

but the error gives me : uninitialized constant Mime::CHOOSE_LIST

Am I misunderstanding something?


The respond_to block expects you to use a MIME type such as html, json, xml, etc. You can add other custom types (see http://weblog.rubyonrails.org/2006/12/19/using-custom-mime-types) however Rails provides most of the more common types. To fix this you need to change choose_list to something else.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜