Hi,
I'm trying to work with a RESTful server but I have some problem to setup my project. I have a model class like this :
class User < ActiveResource::Base
self.site = "http://diufvm31.unifr.ch:8090/CyberCoachServer/resources/users/"
end
this controller :
class UsersController < ApplicationController
def new
end
def index
@users = User.find(:all)
respond_to do |format|
format.html # index.html.erb
format.json { render :json => @users }
format.xml { render :xml => @users}
end
end
end
and simply this view :
<% @users.each do |user| %>
<p><%= user.username %></p>
<% end %>
But I can't retrieve the data, @users is empty. Anyone has an idea how to fix this issue?
Is there anything useful in log/development.log?
Colin