Well, you can do simply this:

require 'open-uri'

class MyController
  def show
    content = open(URL_TO_FETCH_FROM).read
    render text: content
  end
end

Primitive solution

On Tue, May 12, 2015 at 4:03 PM, Mohammed Rashid <[email protected]>
wrote:

> Yes that is exactly what I need to do. I have been given a link which
> has json data. It must be outputted to ruby web page.
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/454313c31fe8e3a8d8e7fe5988b61f01%40ruby-forum.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAP1h_xf8W7jrbdsqEU25RqW8vP%2BoiwW6V7rxRHDRdJcSaX%3DwaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to