Rails raises lame error when there is no block for custom mime types

7 views
Skip to first unread message

Josh Peek

unread,
May 6, 2007, 5:47:12 PM5/6/07
to Ruby on Rails: Core
Instead of giving up on custom mime types without blocks, Rails should
attempt to render the standard template. Currently you get this
useless exception, "Expected a block but none was given for custom
mime handler #{mime_type}"

I added a simple patch that tries to render the custom format's
template.

respond_to do |format|
format.mobile # action.mobile.erb
format.opml # action.opml.builder
end

Ticket #8174 (http://dev.rubyonrails.org/ticket/8174)

Reply all
Reply to author
Forward
0 new messages