This is active.rb
class Active < ActiveResource::Base self.site = "http://localhost:3002/api/v1/users" # **When i run this it is not fetching data** self.site = Net::HTTP.get(URI.parse("http://localhost:3002/api/v1/users")) # **When i run this i can see the data in console. Will get error Bad URI** end
welcome_controller.rb
def index @active = Active.all end
I am Unable to fetch data from the using active resource. Please let me know Thank you
1.4m articles
1.4m replys
5 comments
57.0k users