You can also use respond_with method and change your render :json => ActiveSupport::JSON.encode( @return ) to respond_with @return
But for using this, you have to specify responds_to :json in controller воскресенье, 17 июня 2012 г., 21:17:32 UTC+3 пользователь Ruby-Forum.com User написал: > > Thank you guys for the answer, but I just did this: > > render :json => ActiveSupport::JSON.encode( @return ) > > -- > Posted via http://www.ruby-forum.com/. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/5K0hPK4pMfQJ. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.