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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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