I am using a named route, like /abc.
I have put…
respond_to do |format|
format.html
format.json (render :json => @variable)
end
in method.
But when I do /abc.json, it doesn’t work.
Any hints?
Thanks.
I am using a named route, like /abc.
I have put…
respond_to do |format|
format.html
format.json (render :json => @variable)
end
in method.
But when I do /abc.json, it doesn’t work.
Any hints?
Thanks.
Colin L. wrote:
Do you need /abc.:format in routes.rb for this?
Great, thanks!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs