Forum: Ruby on Rails Serving formats at named route?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Vapor .. (Guest)
on 2009-04-27 20:04
I am using a named route, like /abc.
I have put...

respond_to do |format|
format.json (render :json => @variable)

in method.

But when I do /abc.json, it doesn't work.
Any hints?
Colin L. (Guest)
on 2009-04-27 20:26
(Received via mailing list)
Do you need /abc.:format in routes.rb for this?

2009/4/27 Vapor .. <removed_email_address@domain.invalid>
Vapor .. (Guest)
on 2009-04-27 20:31
Colin L. wrote:
> Do you need /abc.:format in routes.rb for this?

Great, thanks!
This topic is locked and can not be replied to.